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 #include "content/renderer/bluetooth/bluetooth_dispatcher.h" | 5 #include "content/renderer/bluetooth/bluetooth_dispatcher.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 #include <utility> | 10 #include <utility> |
11 | 11 |
12 #include "base/lazy_instance.h" | 12 #include "base/lazy_instance.h" |
13 #include "base/memory/ptr_util.h" | 13 #include "base/memory/ptr_util.h" |
14 #include "base/message_loop/message_loop.h" | 14 #include "base/message_loop/message_loop.h" |
15 #include "base/thread_task_runner_handle.h" | 15 #include "base/threading/thread_task_runner_handle.h" |
16 #include "content/child/thread_safe_sender.h" | 16 #include "content/child/thread_safe_sender.h" |
17 #include "content/common/bluetooth/bluetooth_messages.h" | 17 #include "content/common/bluetooth/bluetooth_messages.h" |
18 #include "device/bluetooth/bluetooth_uuid.h" | 18 #include "device/bluetooth/bluetooth_uuid.h" |
19 #include "third_party/WebKit/public/platform/modules/bluetooth/WebBluetoothDevic
e.h" | 19 #include "third_party/WebKit/public/platform/modules/bluetooth/WebBluetoothDevic
e.h" |
20 #include "third_party/WebKit/public/platform/modules/bluetooth/WebBluetoothError
.h" | 20 #include "third_party/WebKit/public/platform/modules/bluetooth/WebBluetoothError
.h" |
21 #include "third_party/WebKit/public/platform/modules/bluetooth/WebBluetoothRemot
eGATTService.h" | 21 #include "third_party/WebKit/public/platform/modules/bluetooth/WebBluetoothRemot
eGATTService.h" |
22 #include "third_party/WebKit/public/platform/modules/bluetooth/WebRequestDeviceO
ptions.h" | 22 #include "third_party/WebKit/public/platform/modules/bluetooth/WebRequestDeviceO
ptions.h" |
23 | 23 |
24 using blink::WebBluetoothDevice; | 24 using blink::WebBluetoothDevice; |
25 using blink::WebBluetoothError; | 25 using blink::WebBluetoothError; |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 | 136 |
137 void BluetoothDispatcher::OnRequestDeviceError(int thread_id, | 137 void BluetoothDispatcher::OnRequestDeviceError(int thread_id, |
138 int request_id, | 138 int request_id, |
139 WebBluetoothError error) { | 139 WebBluetoothError error) { |
140 DCHECK(pending_requests_.Lookup(request_id)) << request_id; | 140 DCHECK(pending_requests_.Lookup(request_id)) << request_id; |
141 pending_requests_.Lookup(request_id)->onError(WebBluetoothError(error)); | 141 pending_requests_.Lookup(request_id)->onError(WebBluetoothError(error)); |
142 pending_requests_.Remove(request_id); | 142 pending_requests_.Remove(request_id); |
143 } | 143 } |
144 | 144 |
145 } // namespace content | 145 } // namespace content |
OLD | NEW |