Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(255)

Side by Side Diff: components/proximity_auth/webui/proximity_auth_webui_handler.h

Issue 2560713002: Move RemoteDevice from //components/proximity_auth to //components/cryptauth so that it can be easi… (Closed)
Patch Set: Add cryptauth dependency. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 92
93 // Called when the findEligibleUnlockDevices request succeeds. 93 // Called when the findEligibleUnlockDevices request succeeds.
94 void OnFoundEligibleUnlockDevices( 94 void OnFoundEligibleUnlockDevices(
95 const cryptauth::FindEligibleUnlockDevicesResponse& response); 95 const cryptauth::FindEligibleUnlockDevicesResponse& response);
96 96
97 // Callback when |reachable_phone_flow_| completes. 97 // Callback when |reachable_phone_flow_| completes.
98 void OnReachablePhonesFound( 98 void OnReachablePhonesFound(
99 const std::vector<cryptauth::ExternalDeviceInfo>& reachable_phones); 99 const std::vector<cryptauth::ExternalDeviceInfo>& reachable_phones);
100 100
101 // Called when the RemoteDevice is loaded so we can create a connection. 101 // Called when the RemoteDevice is loaded so we can create a connection.
102 void OnRemoteDevicesLoaded(const std::vector<RemoteDevice>& remote_devices); 102 void OnRemoteDevicesLoaded(
103 const std::vector<cryptauth::RemoteDevice>& remote_devices);
103 104
104 // Converts an ExternalDeviceInfo proto to a JSON dictionary used in 105 // Converts an ExternalDeviceInfo proto to a JSON dictionary used in
105 // JavaScript. 106 // JavaScript.
106 std::unique_ptr<base::DictionaryValue> ExternalDeviceInfoToDictionary( 107 std::unique_ptr<base::DictionaryValue> ExternalDeviceInfoToDictionary(
107 const cryptauth::ExternalDeviceInfo& device_info); 108 const cryptauth::ExternalDeviceInfo& device_info);
108 109
109 // Converts an IneligibleDevice proto to a JSON dictionary used in JavaScript. 110 // Converts an IneligibleDevice proto to a JSON dictionary used in JavaScript.
110 std::unique_ptr<base::DictionaryValue> IneligibleDeviceToDictionary( 111 std::unique_ptr<base::DictionaryValue> IneligibleDeviceToDictionary(
111 const cryptauth::IneligibleDevice& ineligible_device); 112 const cryptauth::IneligibleDevice& ineligible_device);
112 113
(...skipping 28 matching lines...) Expand all
141 // The flow for getting a list of reachable phones. 142 // The flow for getting a list of reachable phones.
142 std::unique_ptr<ReachablePhoneFlow> reachable_phone_flow_; 143 std::unique_ptr<ReachablePhoneFlow> reachable_phone_flow_;
143 144
144 // True if we get a message from the loaded WebContents to know that it is 145 // True if we get a message from the loaded WebContents to know that it is
145 // initialized, and we can inject JavaScript. 146 // initialized, and we can inject JavaScript.
146 bool web_contents_initialized_; 147 bool web_contents_initialized_;
147 148
148 // Member variables for connecting to and authenticating the remote device. 149 // Member variables for connecting to and authenticating the remote device.
149 // TODO(tengs): Support multiple simultaenous connections. 150 // TODO(tengs): Support multiple simultaenous connections.
150 std::unique_ptr<RemoteDeviceLoader> remote_device_loader_; 151 std::unique_ptr<RemoteDeviceLoader> remote_device_loader_;
151 RemoteDevice selected_remote_device_; 152 cryptauth::RemoteDevice selected_remote_device_;
152 std::unique_ptr<RemoteDeviceLifeCycle> life_cycle_; 153 std::unique_ptr<RemoteDeviceLifeCycle> life_cycle_;
153 std::unique_ptr<RemoteStatusUpdate> last_remote_status_update_; 154 std::unique_ptr<RemoteStatusUpdate> last_remote_status_update_;
154 155
155 base::WeakPtrFactory<ProximityAuthWebUIHandler> weak_ptr_factory_; 156 base::WeakPtrFactory<ProximityAuthWebUIHandler> weak_ptr_factory_;
156 157
157 DISALLOW_COPY_AND_ASSIGN(ProximityAuthWebUIHandler); 158 DISALLOW_COPY_AND_ASSIGN(ProximityAuthWebUIHandler);
158 }; 159 };
159 160
160 } // namespace proximity_auth 161 } // namespace proximity_auth
161 162
162 #endif // COMPONENTS_PROXIMITY_AUTH_WEBUI_PROXIMITY_AUTH_WEBUI_HANDLER_H_ 163 #endif // COMPONENTS_PROXIMITY_AUTH_WEBUI_PROXIMITY_AUTH_WEBUI_HANDLER_H_
OLDNEW
« no previous file with comments | « components/proximity_auth/unlock_manager_unittest.cc ('k') | components/proximity_auth/webui/proximity_auth_webui_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698