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/child/bluetooth/bluetooth_dispatcher.h" | 5 #include "content/child/bluetooth/bluetooth_dispatcher.h" |
6 | 6 |
7 #include "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/thread_task_runner_handle.h" | 10 #include "base/thread_task_runner_handle.h" |
11 #include "content/child/thread_safe_sender.h" | 11 #include "content/child/thread_safe_sender.h" |
12 #include "content/common/bluetooth/bluetooth_messages.h" | 12 #include "content/common/bluetooth/bluetooth_messages.h" |
13 #include "third_party/WebKit/public/platform/WebBluetoothDevice.h" | 13 #include "third_party/WebKit/public/platform/modules/bluetooth/WebBluetoothDevic
e.h" |
14 #include "third_party/WebKit/public/platform/WebBluetoothError.h" | 14 #include "third_party/WebKit/public/platform/modules/bluetooth/WebBluetoothError
.h" |
15 | 15 |
16 using blink::WebBluetoothDevice; | 16 using blink::WebBluetoothDevice; |
17 using blink::WebBluetoothError; | 17 using blink::WebBluetoothError; |
18 using blink::WebBluetoothRequestDeviceCallbacks; | 18 using blink::WebBluetoothRequestDeviceCallbacks; |
19 using blink::WebString; | 19 using blink::WebString; |
20 using blink::WebVector; | 20 using blink::WebVector; |
21 | 21 |
22 namespace content { | 22 namespace content { |
23 | 23 |
24 namespace { | 24 namespace { |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 int request_id, | 138 int request_id, |
139 BluetoothError error_type) { | 139 BluetoothError error_type) { |
140 DCHECK(pending_requests_.Lookup(request_id)) << request_id; | 140 DCHECK(pending_requests_.Lookup(request_id)) << request_id; |
141 pending_requests_.Lookup(request_id) | 141 pending_requests_.Lookup(request_id) |
142 ->onError(new WebBluetoothError( | 142 ->onError(new WebBluetoothError( |
143 WebBluetoothErrorFromBluetoothError(error_type), "")); | 143 WebBluetoothErrorFromBluetoothError(error_type), "")); |
144 pending_requests_.Remove(request_id); | 144 pending_requests_.Remove(request_id); |
145 } | 145 } |
146 | 146 |
147 } // namespace content | 147 } // namespace content |
OLD | NEW |