| Index: chrome/browser/extensions/api/api_function.h
|
| diff --git a/chrome/browser/extensions/api/api_function.h b/chrome/browser/extensions/api/api_function.h
|
| index 2a91e304dc1339881ec363290725594f35f4954b..eda006c446cea2d1624a9f11ec8018544e402490 100644
|
| --- a/chrome/browser/extensions/api/api_function.h
|
| +++ b/chrome/browser/extensions/api/api_function.h
|
| @@ -6,22 +6,22 @@
|
| #define CHROME_BROWSER_EXTENSIONS_API_API_FUNCTION_H_
|
|
|
| #include "chrome/browser/extensions/extension_function.h"
|
| -#include "chrome/browser/extensions/api/api_resource.h"
|
| #include "content/public/browser/browser_thread.h"
|
|
|
| -class ExtensionService;
|
| -
|
| namespace extensions {
|
|
|
| -class APIResourceController;
|
| -class APIResourceEventNotifier;
|
| +class ApiResourceEventNotifier;
|
|
|
| -// AsyncAPIFunction provides convenient thread management for APIs that need to
|
| +// AsyncApiFunction provides convenient thread management for APIs that need to
|
| // do essentially all their work on a thread other than the UI thread.
|
| -class AsyncAPIFunction : public AsyncExtensionFunction {
|
| +class AsyncApiFunction : public AsyncExtensionFunction {
|
| protected:
|
| - AsyncAPIFunction();
|
| - virtual ~AsyncAPIFunction() {}
|
| + AsyncApiFunction();
|
| + virtual ~AsyncApiFunction() {}
|
| +
|
| + // Like Prepare(). A useful place to put common work in an ApiFunction
|
| + // superclass that multiple API functions want to share.
|
| + virtual bool PrePrepare();
|
|
|
| // Set up for work (e.g., validate arguments). Guaranteed to happen on UI
|
| // thread.
|
| @@ -34,7 +34,7 @@ class AsyncAPIFunction : public AsyncExtensionFunction {
|
| // Start the asynchronous work. Guraranteed to happen on requested thread.
|
| virtual void AsyncWorkStart();
|
|
|
| - // Notify AsyncIOAPIFunction that the work is completed
|
| + // Notify AsyncIOApiFunction that the work is completed
|
| void AsyncWorkCompleted();
|
|
|
| // Respond. Guaranteed to happen on UI thread.
|
| @@ -51,10 +51,7 @@ class AsyncAPIFunction : public AsyncExtensionFunction {
|
| int DeprecatedExtractSrcId(size_t argument_position);
|
|
|
| // Utility.
|
| - APIResourceEventNotifier* CreateEventNotifier(int src_id);
|
| -
|
| - // Access to the controller singleton.
|
| - APIResourceController* controller();
|
| + ApiResourceEventNotifier* CreateEventNotifier(int src_id);
|
|
|
| // ExtensionFunction::RunImpl()
|
| virtual bool RunImpl() OVERRIDE;
|
| @@ -71,8 +68,6 @@ class AsyncAPIFunction : public AsyncExtensionFunction {
|
| // If you don't want your Work() method to happen on the IO thread, then set
|
| // this to the thread that you do want, preferably in Prepare().
|
| content::BrowserThread::ID work_thread_id_;
|
| -
|
| - ExtensionService* extension_service_;
|
| };
|
|
|
| } // namespace extensions
|
|
|