Roll src/third_party/WebKit eac3800:0237a66 (svn 202606:202607)
[chromium-blink-merge.git] / components / copresence / public / copresence_observer.h
blob1e28726927e53815f46a38f2af352171927db6cc
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_
8 namespace copresence {
10 class Directive;
11 struct TransmittedToken;
12 struct ReceivedToken;
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 {
19 public:
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;
29 protected:
30 virtual ~CopresenceObserver() {}
33 } // namespace copresence
35 #endif // COMPONENTS_COPRESENCE_PUBLIC_COPRESENCE_OBSERVER_H_