Index: chrome/browser/extensions/api/extension_action/extension_action_api.h |
diff --git a/chrome/browser/extensions/api/extension_action/extension_action_api.h b/chrome/browser/extensions/api/extension_action/extension_action_api.h |
index 692576c088aa90fd86be3fb22cc86c20e85bde50..8471ae33328f882ae3ca94260ac372a9d1d6821f 100644 |
--- a/chrome/browser/extensions/api/extension_action/extension_action_api.h |
+++ b/chrome/browser/extensions/api/extension_action/extension_action_api.h |
@@ -5,6 +5,8 @@ |
#ifndef CHROME_BROWSER_EXTENSIONS_API_EXTENSION_ACTION_EXTENSION_ACTION_API_H_ |
#define CHROME_BROWSER_EXTENSIONS_API_EXTENSION_ACTION_EXTENSION_ACTION_API_H_ |
+#include <string> |
+ |
#include "base/memory/weak_ptr.h" |
#include "chrome/browser/extensions/api/profile_keyed_api_factory.h" |
#include "chrome/browser/extensions/extension_action.h" |
@@ -341,6 +343,30 @@ class BrowserActionDisableFunction : public ExtensionActionHideFunction { |
virtual ~BrowserActionDisableFunction() {} |
}; |
+class BrowserActionOpenPopupFunction : public UIThreadExtensionFunction, |
+ public content::NotificationObserver { |
+ public: |
+ DECLARE_EXTENSION_FUNCTION("browserAction.openPopup", |
+ BROWSERACTION_OPEN_POPUP) |
+ BrowserActionOpenPopupFunction(); |
+ |
+ private: |
+ virtual ~BrowserActionOpenPopupFunction() {} |
+ |
+ // ExtensionFunction: |
+ virtual bool RunImpl() OVERRIDE; |
+ |
+ virtual void Observe(int type, |
+ const content::NotificationSource& source, |
+ const content::NotificationDetails& details) OVERRIDE; |
+ void OpenPopupTimedOut(); |
+ |
+ content::NotificationRegistrar registrar_; |
+ bool response_sent_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(BrowserActionOpenPopupFunction); |
+}; |
+ |
// |
// scriptBadge.* aliases for supported scriptBadge APIs. |
// |