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

Side by Side Diff: content/browser/bluetooth/bluetooth_dispatcher_host.h

Issue 1842223003: Remove outdated devices from Android device chooser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed unit test for ItemChooserDialog Created 4 years, 8 months 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 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 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 // Returns the origin for the frame with "frame_routing_id" in 264 // Returns the origin for the frame with "frame_routing_id" in
265 // render_process_id_. 265 // render_process_id_.
266 url::Origin GetOrigin(int frame_routing_id); 266 url::Origin GetOrigin(int frame_routing_id);
267 267
268 // Returns true if the frame has permission to access the characteristic 268 // Returns true if the frame has permission to access the characteristic
269 // with |characteristic_instance_id|. 269 // with |characteristic_instance_id|.
270 bool CanFrameAccessCharacteristicInstance( 270 bool CanFrameAccessCharacteristicInstance(
271 int frame_routing_id, 271 int frame_routing_id,
272 const std::string& characteristic_instance_id); 272 const std::string& characteristic_instance_id);
273 273
274 // Populate the chooser with existing devices.
275 void PopulateWithExistingDevices(RequestDeviceSession* session,
276 int chooser_id);
277
274 int render_process_id_; 278 int render_process_id_;
275 279
276 // Maps a (thread_id,request_id) to information about its requestDevice call, 280 // Maps a (thread_id,request_id) to information about its requestDevice call,
277 // including the chooser dialog. 281 // including the chooser dialog.
278 // An entry is added to this map in OnRequestDevice, and should be removed 282 // An entry is added to this map in OnRequestDevice, and should be removed
279 // again everywhere a requestDevice() reply is sent. 283 // again everywhere a requestDevice() reply is sent.
280 IDMap<RequestDeviceSession, IDMapOwnPointer> request_device_sessions_; 284 IDMap<RequestDeviceSession, IDMapOwnPointer> request_device_sessions_;
281 285
282 BluetoothAllowedDevicesMap allowed_devices_map_; 286 BluetoothAllowedDevicesMap allowed_devices_map_;
283 287
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 // copies verify they are also used on the UI thread. 329 // copies verify they are also used on the UI thread.
326 base::WeakPtr<BluetoothDispatcherHost> weak_ptr_on_ui_thread_; 330 base::WeakPtr<BluetoothDispatcherHost> weak_ptr_on_ui_thread_;
327 base::WeakPtrFactory<BluetoothDispatcherHost> weak_ptr_factory_; 331 base::WeakPtrFactory<BluetoothDispatcherHost> weak_ptr_factory_;
328 332
329 DISALLOW_COPY_AND_ASSIGN(BluetoothDispatcherHost); 333 DISALLOW_COPY_AND_ASSIGN(BluetoothDispatcherHost);
330 }; 334 };
331 335
332 } // namespace content 336 } // namespace content
333 337
334 #endif // CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_DISPATCHER_HOST_H_ 338 #endif // CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_DISPATCHER_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698