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 "extensions/browser/api/bluetooth_socket/bluetooth_socket_event_dispatc
her.h" | 5 #include "extensions/browser/api/bluetooth_socket/bluetooth_socket_event_dispatc
her.h" |
6 | 6 |
| 7 #include "base/lazy_instance.h" |
7 #include "device/bluetooth/bluetooth_device.h" | 8 #include "device/bluetooth/bluetooth_device.h" |
8 #include "device/bluetooth/bluetooth_socket.h" | 9 #include "device/bluetooth/bluetooth_socket.h" |
9 #include "extensions/browser/api/bluetooth_socket/bluetooth_api_socket.h" | 10 #include "extensions/browser/api/bluetooth_socket/bluetooth_api_socket.h" |
10 #include "extensions/browser/event_router.h" | 11 #include "extensions/browser/event_router.h" |
11 #include "extensions/common/api/bluetooth_socket.h" | 12 #include "extensions/common/api/bluetooth_socket.h" |
12 #include "net/base/io_buffer.h" | 13 #include "net/base/io_buffer.h" |
13 | 14 |
14 namespace { | 15 namespace { |
15 | 16 |
16 namespace bluetooth_socket = extensions::core_api::bluetooth_socket; | 17 namespace bluetooth_socket = extensions::core_api::bluetooth_socket; |
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
361 if (!extensions::ExtensionsBrowserClient::Get()->IsValidContext(context)) | 362 if (!extensions::ExtensionsBrowserClient::Get()->IsValidContext(context)) |
362 return; | 363 return; |
363 | 364 |
364 EventRouter* router = EventRouter::Get(context); | 365 EventRouter* router = EventRouter::Get(context); |
365 if (router) | 366 if (router) |
366 router->DispatchEventToExtension(extension_id, event.Pass()); | 367 router->DispatchEventToExtension(extension_id, event.Pass()); |
367 } | 368 } |
368 | 369 |
369 } // namespace core_api | 370 } // namespace core_api |
370 } // namespace extensions | 371 } // namespace extensions |
OLD | NEW |