1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef COMPONENTS_COPRESENCE_PUBLIC_COPRESENCE_OBSERVER_H_
6 #define COMPONENTS_COPRESENCE_PUBLIC_COPRESENCE_OBSERVER_H_
11 struct TransmittedToken
;
14 // Implement this interface to be notified of changes
15 // to the state of the copresence component.
16 // TODO(ckehoe): Create a LoggingObserver based on this that replaces
17 // equivalent logging elsewhere. Then we know what state is being recorded.
18 class CopresenceObserver
{
20 // Called when the list of active directives has changed.
21 virtual void DirectivesUpdated() = 0;
23 // Called when a token is transmitted.
24 virtual void TokenTransmitted(const TransmittedToken
& token
) = 0;
26 // Called when a token is received.
27 virtual void TokenReceived(const ReceivedToken
& token
) = 0;
30 virtual ~CopresenceObserver() {}
33 } // namespace copresence
35 #endif // COMPONENTS_COPRESENCE_PUBLIC_COPRESENCE_OBSERVER_H_