OLD | NEW |
---|---|
(Empty) | |
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. | |
4 | |
5 #ifndef COMPONENTS_COPRESENCE_PUBLIC_COPRESENCE_OBSERVER_H_ | |
6 #define COMPONENTS_COPRESENCE_PUBLIC_COPRESENCE_OBSERVER_H_ | |
7 | |
8 #include <map> | |
9 #include <string> | |
10 #include <vector> | |
xiyuan
2014/12/18 18:10:52
nit: The above 3 headers seems not used.
Charlie
2014/12/19 03:53:33
Done.
| |
11 | |
12 #include "base/macros.h" | |
13 | |
14 namespace copresence { | |
15 | |
16 class Directive; | |
17 struct TransmittedToken; | |
18 struct ReceivedToken; | |
19 | |
20 // Implement this interface to be notified of changes | |
21 // to the state of the copresence component. | |
22 // TODO(ckehoe): Create a LoggingObserver based on this that replaces | |
23 // equivalent logging elsewhere. Then we know what state is being recorded. | |
24 class CopresenceObserver { | |
25 public: | |
26 CopresenceObserver() {} | |
27 virtual ~CopresenceObserver() {} | |
28 | |
29 // Called when the list of active directives has changed. | |
30 virtual void DirectivesUpdated() = 0; | |
31 | |
32 // Called when a token is transmitted. | |
33 virtual void TokenTransmitted(const TransmittedToken& token) = 0; | |
34 | |
35 // Called when a token is received. | |
36 virtual void TokenReceived(const ReceivedToken& token) = 0; | |
37 | |
38 private: | |
39 DISALLOW_COPY_AND_ASSIGN(CopresenceObserver); | |
xiyuan
2014/12/18 18:10:52
nit: usually we don't use DISALLOW_COPY_AND_ASSIGN
Charlie
2014/12/19 03:53:33
Done.
| |
40 }; | |
41 | |
42 } // namespace copresence | |
43 | |
44 #endif // COMPONENTS_COPRESENCE_PUBLIC_COPRESENCE_OBSERVER_H_ | |
OLD | NEW |