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

Unified Diff: chrome/browser/extensions/api/api_function.h

Issue 11116016: Hook up API to notification_ui_manager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: asargent review suggestion Created 8 years, 2 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
« no previous file with comments | « no previous file | chrome/browser/extensions/api/api_function.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 270e0854304a83de44cd00bb92682310df4945ae..21992537e10da847abfab43a93d3ba49735ba929 100644
--- a/chrome/browser/extensions/api/api_function.h
+++ b/chrome/browser/extensions/api/api_function.h
@@ -12,9 +12,22 @@ namespace extensions {
class ApiResourceEventNotifier;
+class ApiFunction : public UIThreadExtensionFunction {
+ protected:
+ ApiFunction();
+ virtual ~ApiFunction();
+
+ // Looks for a kSrcId key that might have been added to a create method's
+ // options object.
+ int ExtractSrcId(const DictionaryValue* options);
+
+ // Utility.
+ ApiResourceEventNotifier* CreateEventNotifier(int src_id);
+};
+
// 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 ApiFunction {
protected:
AsyncApiFunction();
virtual ~AsyncApiFunction();
@@ -40,13 +53,6 @@ class AsyncApiFunction : public AsyncExtensionFunction {
// Respond. Guaranteed to happen on UI thread.
virtual bool Respond() = 0;
- // Looks for a kSrcId key that might have been added to a create method's
- // options object.
- int ExtractSrcId(const DictionaryValue* options);
-
- // Utility.
- ApiResourceEventNotifier* CreateEventNotifier(int src_id);
-
// ExtensionFunction::RunImpl()
virtual bool RunImpl() OVERRIDE;
« no previous file with comments | « no previous file | chrome/browser/extensions/api/api_function.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698