summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extension_browser_actions_api.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/extensions/extension_browser_actions_api.cc')
-rw-r--r--chrome/browser/extensions/extension_browser_actions_api.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/chrome/browser/extensions/extension_browser_actions_api.cc b/chrome/browser/extensions/extension_browser_actions_api.cc
index 7306d98..c415d02 100644
--- a/chrome/browser/extensions/extension_browser_actions_api.cc
+++ b/chrome/browser/extensions/extension_browser_actions_api.cc
@@ -61,6 +61,18 @@ bool BrowserActionSetTitleFunction::RunBrowserAction() {
return true;
}
+bool BrowserActionSetPopupFunction::RunBrowserAction() {
+ std::string popup_string;
+ EXTENSION_FUNCTION_VALIDATE(details_->GetString(L"popup", &popup_string));
+
+ GURL popup_url;
+ if (!popup_string.empty())
+ popup_url = dispatcher()->GetExtension()->GetResourceURL(popup_string);
+
+ browser_action_->SetPopupUrl(tab_id_, popup_url);
+ return true;
+}
+
bool BrowserActionSetBadgeTextFunction::RunBrowserAction() {
std::string badge_text;
EXTENSION_FUNCTION_VALIDATE(details_->GetString(L"text", &badge_text));