diff options
author | rockot@chromium.org <rockot@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-28 15:06:45 +0000 |
---|---|---|
committer | rockot@chromium.org <rockot@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-28 15:06:45 +0000 |
commit | 659be688fc57bccd965cb8f7a7e6b3f7f248b9a7 (patch) | |
tree | 1ebb50ab7b35f2ae7620d90fb9ebb47347f75e3f /chrome/browser/extensions/api/bluetooth/bluetooth_api.h | |
parent | 065b657bd16bca7115b20774a154808184848045 (diff) | |
download | chromium_src-659be688fc57bccd965cb8f7a7e6b3f7f248b9a7.zip chromium_src-659be688fc57bccd965cb8f7a7e6b3f7f248b9a7.tar.gz chromium_src-659be688fc57bccd965cb8f7a7e6b3f7f248b9a7.tar.bz2 |
Pull AsyncApiFunction out of src/chrome
AsyncApiFunction now inherits UIThreadExtensionFunction directly, rather
than depending on ChromeAsyncExtensionFunction. It's also been moved from
chrome/browser/extensions/api/api_function.{h,cc} to
extensions/browser/api/async_api_function.{h,cc}.
With the exception of notifications API functions, anything which previously
depended on AsyncApiFunction's inheritance of ChromeAsyncExtensionFunction
was doing so only for GetProfile. In all cases, GetProfile() has been replaced
with ExtensionFunction::browser_context() (renamed from context()).
Finally, ApiFunction has been removed since it was identical to
ChromeAsyncExtensionFunction.
BUG=346949
TBR=dmazzoni@chromium.org,mfoltz@chromium.org,fgorski@chromium.org,courage@chromium.org,dewittj@chromium.org,rpaquay@chromium.org,kalman@chromium.org
Review URL: https://codereview.chromium.org/177003015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@254113 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/api/bluetooth/bluetooth_api.h')
-rw-r--r-- | chrome/browser/extensions/api/bluetooth/bluetooth_api.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/chrome/browser/extensions/api/bluetooth/bluetooth_api.h b/chrome/browser/extensions/api/bluetooth/bluetooth_api.h index e7b37ae..552b7dc 100644 --- a/chrome/browser/extensions/api/bluetooth/bluetooth_api.h +++ b/chrome/browser/extensions/api/bluetooth/bluetooth_api.h @@ -9,12 +9,17 @@ #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 "chrome/browser/extensions/api/profile_keyed_api_factory.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" +#include "extensions/browser/extension_function.h" + +namespace content { +class BrowserContext; +} namespace device { @@ -57,7 +62,7 @@ class BluetoothAPI : public ProfileKeyedAPI, public EventRouter::Observer { static const bool kServiceRedirectedInIncognito = true; static const bool kServiceIsNULLWhileTesting = true; - Profile* profile_; + content::BrowserContext* browser_context_; // Created lazily on first access. scoped_ptr<ExtensionBluetoothEventRouter> bluetooth_event_router_; @@ -65,7 +70,7 @@ class BluetoothAPI : public ProfileKeyedAPI, public EventRouter::Observer { namespace api { -class BluetoothAddProfileFunction : public ChromeAsyncExtensionFunction { +class BluetoothAddProfileFunction : public UIThreadExtensionFunction { public: DECLARE_EXTENSION_FUNCTION("bluetooth.addProfile", BLUETOOTH_ADDPROFILE) @@ -85,7 +90,7 @@ class BluetoothAddProfileFunction : public ChromeAsyncExtensionFunction { std::string uuid_; }; -class BluetoothRemoveProfileFunction : public ChromeSyncExtensionFunction { +class BluetoothRemoveProfileFunction : public SyncExtensionFunction { public: DECLARE_EXTENSION_FUNCTION("bluetooth.removeProfile", BLUETOOTH_REMOVEPROFILE) @@ -169,7 +174,7 @@ class BluetoothConnectFunction : public BluetoothExtensionFunction { void OnErrorCallback(); }; -class BluetoothDisconnectFunction : public ChromeSyncExtensionFunction { +class BluetoothDisconnectFunction : public SyncExtensionFunction { public: DECLARE_EXTENSION_FUNCTION("bluetooth.disconnect", BLUETOOTH_DISCONNECT) |