| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/extensions/api/bluetooth/bluetooth_event_router.h" | 5 #include "chrome/browser/extensions/api/bluetooth/bluetooth_event_router.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| 11 #include "base/json/json_writer.h" | 11 #include "base/json/json_writer.h" |
| 12 #include "base/logging.h" | 12 #include "base/logging.h" |
| 13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
| 14 #include "base/memory/scoped_vector.h" | 14 #include "base/memory/scoped_vector.h" |
| 15 #include "base/strings/utf_string_conversions.h" | 15 #include "base/strings/utf_string_conversions.h" |
| 16 #include "chrome/browser/chrome_notification_types.h" | 16 #include "chrome/browser/chrome_notification_types.h" |
| 17 #include "chrome/browser/extensions/api/bluetooth/bluetooth_api_utils.h" | 17 #include "chrome/browser/extensions/api/bluetooth/bluetooth_api_utils.h" |
| 18 #include "chrome/browser/extensions/event_names.h" | 18 #include "chrome/browser/extensions/event_names.h" |
| 19 #include "chrome/browser/extensions/extension_system.h" | 19 #include "chrome/browser/profiles/profile.h" |
| 20 #include "chrome/common/extensions/api/bluetooth.h" | 20 #include "chrome/common/extensions/api/bluetooth.h" |
| 21 #include "content/public/browser/notification_details.h" | 21 #include "content/public/browser/notification_details.h" |
| 22 #include "content/public/browser/notification_source.h" | 22 #include "content/public/browser/notification_source.h" |
| 23 #include "device/bluetooth/bluetooth_adapter.h" | 23 #include "device/bluetooth/bluetooth_adapter.h" |
| 24 #include "device/bluetooth/bluetooth_adapter_factory.h" | 24 #include "device/bluetooth/bluetooth_adapter_factory.h" |
| 25 #include "device/bluetooth/bluetooth_device.h" | 25 #include "device/bluetooth/bluetooth_device.h" |
| 26 #include "device/bluetooth/bluetooth_profile.h" | 26 #include "device/bluetooth/bluetooth_profile.h" |
| 27 #include "device/bluetooth/bluetooth_socket.h" | 27 #include "device/bluetooth/bluetooth_socket.h" |
| 28 #include "extensions/browser/event_router.h" | 28 #include "extensions/browser/event_router.h" |
| 29 #include "extensions/browser/extension_system.h" |
| 29 | 30 |
| 30 namespace extensions { | 31 namespace extensions { |
| 31 | 32 |
| 32 namespace bluetooth = api::bluetooth; | 33 namespace bluetooth = api::bluetooth; |
| 33 | 34 |
| 34 // A struct storing a Bluetooth socket and the extension that added it. | 35 // A struct storing a Bluetooth socket and the extension that added it. |
| 35 struct ExtensionBluetoothSocketRecord { | 36 struct ExtensionBluetoothSocketRecord { |
| 36 std::string extension_id; | 37 std::string extension_id; |
| 37 scoped_refptr<device::BluetoothSocket> socket; | 38 scoped_refptr<device::BluetoothSocket> socket; |
| 38 }; | 39 }; |
| (...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 case chrome::NOTIFICATION_EXTENSION_UNLOADED: { | 337 case chrome::NOTIFICATION_EXTENSION_UNLOADED: { |
| 337 extensions::UnloadedExtensionInfo* info = | 338 extensions::UnloadedExtensionInfo* info = |
| 338 content::Details<extensions::UnloadedExtensionInfo>(details).ptr(); | 339 content::Details<extensions::UnloadedExtensionInfo>(details).ptr(); |
| 339 CleanUpForExtension(info->extension->id()); | 340 CleanUpForExtension(info->extension->id()); |
| 340 break; | 341 break; |
| 341 } | 342 } |
| 342 } | 343 } |
| 343 } | 344 } |
| 344 | 345 |
| 345 } // namespace extensions | 346 } // namespace extensions |
| OLD | NEW |