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

Unified Diff: chrome/browser/extensions/api/bluetooth/bluetooth_api.h

Issue 177003015: Pull AsyncApiFunction out of src/chrome (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/api/bluetooth/bluetooth_api.h
diff --git a/chrome/browser/extensions/api/bluetooth/bluetooth_api.h b/chrome/browser/extensions/api/bluetooth/bluetooth_api.h
index d914b42df10e415d5972fb59740931583345d671..caaab5f0dedb15a4234097b3c0c93bdec9d295b1 100644
--- a/chrome/browser/extensions/api/bluetooth/bluetooth_api.h
+++ b/chrome/browser/extensions/api/bluetooth/bluetooth_api.h
@@ -9,13 +9,19 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
-#include "chrome/browser/extensions/api/api_function.h"
#include "chrome/browser/extensions/api/bluetooth/bluetooth_extension_function.h"
#include "components/browser_context_keyed_service/browser_context_keyed_service.h"
#include "device/bluetooth/bluetooth_device.h"
#include "device/bluetooth/bluetooth_profile.h"
+#include "extensions/browser/api/async_api_function.h"
#include "extensions/browser/event_router.h"
+class Profile;
+
+namespace content {
+class BrowserContext;
+}
+
namespace device {
class BluetoothAdapter;
@@ -29,12 +35,12 @@ namespace extensions {
class ExtensionBluetoothEventRouter;
-// The profile-keyed service that manages the bluetooth extension API.
+// The context-keyed service that manages the bluetooth extension API.
class BluetoothAPI : public BrowserContextKeyedService,
public EventRouter::Observer {
public:
- // Convenience method to get the BluetoothAPI for a profile.
- static BluetoothAPI* Get(Profile* profile);
+ // Convenience method to get the BluetoothAPI for a browser context.
+ static BluetoothAPI* Get(content::BrowserContext* context);
explicit BluetoothAPI(Profile* profile);
virtual ~BluetoothAPI();
@@ -49,7 +55,7 @@ class BluetoothAPI : public BrowserContextKeyedService,
virtual void OnListenerRemoved(const EventListenerInfo& details) OVERRIDE;
private:
- Profile* profile_;
+ content::BrowserContext* browser_context_;
// Created lazily on first access.
scoped_ptr<ExtensionBluetoothEventRouter> bluetooth_event_router_;

Powered by Google App Engine
This is Rietveld 408576698