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

Side by Side Diff: extensions/browser/api/bluetooth_socket/bluetooth_socket_event_dispatcher.h

Issue 1226353004: Generate all extension schema namespaces as "api" and instead vary the generated bundle names. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 5 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
OLDNEW
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 #ifndef EXTENSIONS_BROWSER_API_BLUETOOTH_SOCKET_BLUETOOTH_SOCKET_EVENT_DISPATCHE R_H_ 5 #ifndef EXTENSIONS_BROWSER_API_BLUETOOTH_SOCKET_BLUETOOTH_SOCKET_EVENT_DISPATCHE R_H_
6 #define EXTENSIONS_BROWSER_API_BLUETOOTH_SOCKET_BLUETOOTH_SOCKET_EVENT_DISPATCHE R_H_ 6 #define EXTENSIONS_BROWSER_API_BLUETOOTH_SOCKET_BLUETOOTH_SOCKET_EVENT_DISPATCHE R_H_
7 7
8 #include "extensions/browser/api/api_resource_manager.h" 8 #include "extensions/browser/api/api_resource_manager.h"
9 #include "extensions/browser/api/bluetooth_socket/bluetooth_api_socket.h" 9 #include "extensions/browser/api/bluetooth_socket/bluetooth_api_socket.h"
10 #include "extensions/browser/browser_context_keyed_api_factory.h" 10 #include "extensions/browser/browser_context_keyed_api_factory.h"
11 11
12 namespace content { 12 namespace content {
13 class BrowserContext; 13 class BrowserContext;
14 } 14 }
15 15
16 namespace device { 16 namespace device {
17 class BluetoothDevice; 17 class BluetoothDevice;
18 class BluetoothSocket; 18 class BluetoothSocket;
19 } 19 }
20 20
21 namespace extensions { 21 namespace extensions {
22 struct Event; 22 struct Event;
23 class BluetoothApiSocket; 23 class BluetoothApiSocket;
24 } 24 }
25 25
26 namespace extensions { 26 namespace extensions {
27 namespace core_api { 27 namespace api {
28 28
29 // Dispatch events related to "bluetooth" sockets from callback on native socket 29 // Dispatch events related to "bluetooth" sockets from callback on native socket
30 // instances. There is one instance per browser context. 30 // instances. There is one instance per browser context.
31 class BluetoothSocketEventDispatcher 31 class BluetoothSocketEventDispatcher
32 : public BrowserContextKeyedAPI, 32 : public BrowserContextKeyedAPI,
33 public base::SupportsWeakPtr<BluetoothSocketEventDispatcher> { 33 public base::SupportsWeakPtr<BluetoothSocketEventDispatcher> {
34 public: 34 public:
35 explicit BluetoothSocketEventDispatcher(content::BrowserContext* context); 35 explicit BluetoothSocketEventDispatcher(content::BrowserContext* context);
36 ~BluetoothSocketEventDispatcher() override; 36 ~BluetoothSocketEventDispatcher() override;
37 37
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 static void DispatchEvent(void* browser_context_id, 106 static void DispatchEvent(void* browser_context_id,
107 const std::string& extension_id, 107 const std::string& extension_id,
108 scoped_ptr<Event> event); 108 scoped_ptr<Event> event);
109 109
110 // Usually FILE thread (except for unit testing). 110 // Usually FILE thread (except for unit testing).
111 content::BrowserThread::ID thread_id_; 111 content::BrowserThread::ID thread_id_;
112 content::BrowserContext* const browser_context_; 112 content::BrowserContext* const browser_context_;
113 scoped_refptr<SocketData> sockets_; 113 scoped_refptr<SocketData> sockets_;
114 }; 114 };
115 115
116 } // namespace core_api 116 } // namespace api
117 } // namespace extensions 117 } // namespace extensions
118 118
119 #endif // EXTENSIONS_BROWSER_API_BLUETOOTH_SOCKET_BLUETOOTH_SOCKET_EVENT_DISPAT CHER_H_ 119 #endif // EXTENSIONS_BROWSER_API_BLUETOOTH_SOCKET_BLUETOOTH_SOCKET_EVENT_DISPAT CHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698