OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef COMPONENTS_PROXIMITY_AUTH_MESSENGER_OBSERVER_H | 5 #ifndef COMPONENTS_PROXIMITY_AUTH_MESSENGER_OBSERVER_H |
6 #define COMPONENTS_PROXIMITY_AUTH_MESSENGER_OBSERVER_H | 6 #define COMPONENTS_PROXIMITY_AUTH_MESSENGER_OBSERVER_H |
7 | 7 |
| 8 #include <memory> |
8 #include <string> | 9 #include <string> |
9 | 10 |
10 #include "base/memory/scoped_ptr.h" | |
11 | |
12 namespace proximity_auth { | 11 namespace proximity_auth { |
13 | 12 |
14 struct RemoteStatusUpdate; | 13 struct RemoteStatusUpdate; |
15 | 14 |
16 // An interface for observing events that happen on a Messenger. | 15 // An interface for observing events that happen on a Messenger. |
17 class MessengerObserver { | 16 class MessengerObserver { |
18 public: | 17 public: |
19 // Called when sending an "Easy Unlock used" local event message completes. | 18 // Called when sending an "Easy Unlock used" local event message completes. |
20 // |success| is true iff the event was sent successfully. | 19 // |success| is true iff the event was sent successfully. |
21 virtual void OnUnlockEventSent(bool success){}; | 20 virtual void OnUnlockEventSent(bool success){}; |
(...skipping 10 matching lines...) Expand all Loading... |
32 // |success| is true iff the request was made successfully. | 31 // |success| is true iff the request was made successfully. |
33 virtual void OnUnlockResponse(bool success){}; | 32 virtual void OnUnlockResponse(bool success){}; |
34 | 33 |
35 // Called when the underlying secure channel disconnects. | 34 // Called when the underlying secure channel disconnects. |
36 virtual void OnDisconnected(){}; | 35 virtual void OnDisconnected(){}; |
37 }; | 36 }; |
38 | 37 |
39 } // namespace proximity_auth | 38 } // namespace proximity_auth |
40 | 39 |
41 #endif // COMPONENTS_PROXIMITY_AUTH_MESSENGER_OBSERVER_H | 40 #endif // COMPONENTS_PROXIMITY_AUTH_MESSENGER_OBSERVER_H |
OLD | NEW |