OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 // ID Not In Map Note: | 5 // ID Not In Map Note: |
6 // A service, characteristic, or descriptor ID not in the corresponding | 6 // A service, characteristic, or descriptor ID not in the corresponding |
7 // BluetoothDispatcherHost map [service_id_to_device_address_, | 7 // BluetoothDispatcherHost map [service_id_to_device_address_, |
8 // characteristic_id_to_service_id_, descriptor_to_characteristic_] implies a | 8 // characteristic_id_to_service_id_, descriptor_to_characteristic_] implies a |
9 // hostile renderer because a renderer obtains the corresponding ID from this | 9 // hostile renderer because a renderer obtains the corresponding ID from this |
10 // class and it will be added to the map at that time. | 10 // class and it will be added to the map at that time. |
11 | 11 |
12 #include "content/browser/bluetooth/web_bluetooth_service_impl.h" | 12 #include "content/browser/bluetooth/web_bluetooth_service_impl.h" |
13 | 13 |
14 #include <algorithm> | 14 #include <algorithm> |
15 | 15 |
16 #include "base/thread_task_runner_handle.h" | 16 #include "base/threading/thread_task_runner_handle.h" |
17 #include "content/browser/bluetooth/bluetooth_blacklist.h" | 17 #include "content/browser/bluetooth/bluetooth_blacklist.h" |
18 #include "content/browser/bluetooth/bluetooth_dispatcher_host.h" | 18 #include "content/browser/bluetooth/bluetooth_dispatcher_host.h" |
19 #include "content/browser/bluetooth/frame_connected_bluetooth_devices.h" | 19 #include "content/browser/bluetooth/frame_connected_bluetooth_devices.h" |
20 #include "content/browser/renderer_host/render_process_host_impl.h" | 20 #include "content/browser/renderer_host/render_process_host_impl.h" |
21 #include "content/public/browser/navigation_handle.h" | 21 #include "content/public/browser/navigation_handle.h" |
22 #include "content/public/browser/render_frame_host.h" | 22 #include "content/public/browser/render_frame_host.h" |
23 #include "content/public/browser/web_contents.h" | 23 #include "content/public/browser/web_contents.h" |
24 #include "device/bluetooth/bluetooth_remote_gatt_characteristic.h" | 24 #include "device/bluetooth/bluetooth_remote_gatt_characteristic.h" |
25 | 25 |
26 namespace content { | 26 namespace content { |
(...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
828 void WebBluetoothServiceImpl::ClearState() { | 828 void WebBluetoothServiceImpl::ClearState() { |
829 characteristic_id_to_notify_session_.clear(); | 829 characteristic_id_to_notify_session_.clear(); |
830 pending_primary_services_requests_.clear(); | 830 pending_primary_services_requests_.clear(); |
831 characteristic_id_to_service_id_.clear(); | 831 characteristic_id_to_service_id_.clear(); |
832 service_id_to_device_address_.clear(); | 832 service_id_to_device_address_.clear(); |
833 connected_devices_.reset( | 833 connected_devices_.reset( |
834 new FrameConnectedBluetoothDevices(render_frame_host_)); | 834 new FrameConnectedBluetoothDevices(render_frame_host_)); |
835 } | 835 } |
836 | 836 |
837 } // namespace content | 837 } // namespace content |
OLD | NEW |