Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(232)

Side by Side Diff: chrome/browser/extensions/api/bluetooth/bluetooth_event_router.cc

Issue 147923005: Split ExtensionSystem interface from ExtensionSystemImpl implementation, part 1. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: re^3base Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698