| 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 namespace copresence { | |
| 9 | |
| 10 class Directive; | |
| 11 struct TransmittedToken; | |
| 12 struct ReceivedToken; | |
| 13 | |
| 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; | |
| 22 | |
| 23 // Called when a token is transmitted. | |
| 24 virtual void TokenTransmitted(const TransmittedToken& token) = 0; | |
| 25 | |
| 26 // Called when a token is received. | |
| 27 virtual void TokenReceived(const ReceivedToken& token) = 0; | |
| 28 | |
| 29 protected: | |
| 30 virtual ~CopresenceObserver() {} | |
| 31 }; | |
| 32 | |
| 33 } // namespace copresence | |
| 34 | |
| 35 #endif // COMPONENTS_COPRESENCE_PUBLIC_COPRESENCE_OBSERVER_H_ | |
| OLD | NEW |