| 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 CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_DISPATCHER_HOST_H_ | 5 #ifndef CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_DISPATCHER_HOST_H_ |
| 6 #define CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_DISPATCHER_HOST_H_ | 6 #define CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_DISPATCHER_HOST_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 | 193 |
| 194 // Queries the platform cache for a Device with |device_id| for |origin|. | 194 // Queries the platform cache for a Device with |device_id| for |origin|. |
| 195 // Fills in the |outcome| field and the |device| field if successful. | 195 // Fills in the |outcome| field and the |device| field if successful. |
| 196 CacheQueryResult QueryCacheForDevice(const url::Origin& origin, | 196 CacheQueryResult QueryCacheForDevice(const url::Origin& origin, |
| 197 const std::string& device_id); | 197 const std::string& device_id); |
| 198 | 198 |
| 199 // Returns the origin for the frame with "frame_routing_id" in | 199 // Returns the origin for the frame with "frame_routing_id" in |
| 200 // render_process_id_. | 200 // render_process_id_. |
| 201 url::Origin GetOrigin(int frame_routing_id); | 201 url::Origin GetOrigin(int frame_routing_id); |
| 202 | 202 |
| 203 // Populate the chooser with existing devices. |
| 204 void PopulateWithExistingDevices(RequestDeviceSession* session, |
| 205 int chooser_id); |
| 206 |
| 203 int render_process_id_; | 207 int render_process_id_; |
| 204 | 208 |
| 205 // Maps a (thread_id,request_id) to information about its requestDevice call, | 209 // Maps a (thread_id,request_id) to information about its requestDevice call, |
| 206 // including the chooser dialog. | 210 // including the chooser dialog. |
| 207 // An entry is added to this map in OnRequestDevice, and should be removed | 211 // An entry is added to this map in OnRequestDevice, and should be removed |
| 208 // again everywhere a requestDevice() reply is sent. | 212 // again everywhere a requestDevice() reply is sent. |
| 209 IDMap<RequestDeviceSession, IDMapOwnPointer> request_device_sessions_; | 213 IDMap<RequestDeviceSession, IDMapOwnPointer> request_device_sessions_; |
| 210 | 214 |
| 211 BluetoothAllowedDevicesMap allowed_devices_map_; | 215 BluetoothAllowedDevicesMap allowed_devices_map_; |
| 212 | 216 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 233 // copies verify they are also used on the UI thread. | 237 // copies verify they are also used on the UI thread. |
| 234 base::WeakPtr<BluetoothDispatcherHost> weak_ptr_on_ui_thread_; | 238 base::WeakPtr<BluetoothDispatcherHost> weak_ptr_on_ui_thread_; |
| 235 base::WeakPtrFactory<BluetoothDispatcherHost> weak_ptr_factory_; | 239 base::WeakPtrFactory<BluetoothDispatcherHost> weak_ptr_factory_; |
| 236 | 240 |
| 237 DISALLOW_COPY_AND_ASSIGN(BluetoothDispatcherHost); | 241 DISALLOW_COPY_AND_ASSIGN(BluetoothDispatcherHost); |
| 238 }; | 242 }; |
| 239 | 243 |
| 240 } // namespace content | 244 } // namespace content |
| 241 | 245 |
| 242 #endif // CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_DISPATCHER_HOST_H_ | 246 #endif // CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_DISPATCHER_HOST_H_ |
| OLD | NEW |