OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_WEBUI_PROXIMITY_AUTH_WEBUI_HANDLER_H_ | 5 #ifndef COMPONENTS_PROXIMITY_AUTH_WEBUI_PROXIMITY_AUTH_WEBUI_HANDLER_H_ |
6 #define COMPONENTS_PROXIMITY_AUTH_WEBUI_PROXIMITY_AUTH_WEBUI_HANDLER_H_ | 6 #define COMPONENTS_PROXIMITY_AUTH_WEBUI_PROXIMITY_AUTH_WEBUI_HANDLER_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 // Cleans up the connection to the selected remote device. | 113 // Cleans up the connection to the selected remote device. |
114 void CleanUpRemoteDeviceLifeCycle(); | 114 void CleanUpRemoteDeviceLifeCycle(); |
115 | 115 |
116 // RemoteDeviceLifeCycle::Observer: | 116 // RemoteDeviceLifeCycle::Observer: |
117 void OnLifeCycleStateChanged(RemoteDeviceLifeCycle::State old_state, | 117 void OnLifeCycleStateChanged(RemoteDeviceLifeCycle::State old_state, |
118 RemoteDeviceLifeCycle::State new_state) override; | 118 RemoteDeviceLifeCycle::State new_state) override; |
119 | 119 |
120 // MessengerObserver: | 120 // MessengerObserver: |
121 void OnRemoteStatusUpdate(const RemoteStatusUpdate& status_update) override; | 121 void OnRemoteStatusUpdate(const RemoteStatusUpdate& status_update) override; |
122 | 122 |
| 123 // Returns the truncated device ID of the local device. |
| 124 std::unique_ptr<base::Value> GetTruncatedLocalDeviceId(); |
| 125 |
123 // Returns the current enrollment state that can be used as a JSON object. | 126 // Returns the current enrollment state that can be used as a JSON object. |
124 std::unique_ptr<base::DictionaryValue> GetEnrollmentStateDictionary(); | 127 std::unique_ptr<base::DictionaryValue> GetEnrollmentStateDictionary(); |
125 | 128 |
126 // Returns the current device sync state that can be used as a JSON object. | 129 // Returns the current device sync state that can be used as a JSON object. |
127 std::unique_ptr<base::DictionaryValue> GetDeviceSyncStateDictionary(); | 130 std::unique_ptr<base::DictionaryValue> GetDeviceSyncStateDictionary(); |
128 | 131 |
129 // Returns the current remote devices that can be used as a JSON object. | 132 // Returns the current remote devices that can be used as a JSON object. |
130 std::unique_ptr<base::ListValue> GetRemoteDevicesList(); | 133 std::unique_ptr<base::ListValue> GetRemoteDevicesList(); |
131 | 134 |
132 // The delegate used to fetch dependencies. Must outlive this instance. | 135 // The delegate used to fetch dependencies. Must outlive this instance. |
(...skipping 20 matching lines...) Expand all Loading... |
153 std::unique_ptr<RemoteStatusUpdate> last_remote_status_update_; | 156 std::unique_ptr<RemoteStatusUpdate> last_remote_status_update_; |
154 | 157 |
155 base::WeakPtrFactory<ProximityAuthWebUIHandler> weak_ptr_factory_; | 158 base::WeakPtrFactory<ProximityAuthWebUIHandler> weak_ptr_factory_; |
156 | 159 |
157 DISALLOW_COPY_AND_ASSIGN(ProximityAuthWebUIHandler); | 160 DISALLOW_COPY_AND_ASSIGN(ProximityAuthWebUIHandler); |
158 }; | 161 }; |
159 | 162 |
160 } // namespace proximity_auth | 163 } // namespace proximity_auth |
161 | 164 |
162 #endif // COMPONENTS_PROXIMITY_AUTH_WEBUI_PROXIMITY_AUTH_WEBUI_HANDLER_H_ | 165 #endif // COMPONENTS_PROXIMITY_AUTH_WEBUI_PROXIMITY_AUTH_WEBUI_HANDLER_H_ |
OLD | NEW |