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

Unified Diff: chrome/browser/ui/views/browser_actions_container.h

Issue 25305002: Implement initial chrome.browserAction.openPopup API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: move to interactive_ui_test Created 7 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
Index: chrome/browser/ui/views/browser_actions_container.h
diff --git a/chrome/browser/ui/views/browser_actions_container.h b/chrome/browser/ui/views/browser_actions_container.h
index 9e3fc949c58b67c126b73e3f558ee3d9f8a75b6f..70b42812b6769c20178d5552df7467a68c8978ce 100644
--- a/chrome/browser/ui/views/browser_actions_container.h
+++ b/chrome/browser/ui/views/browser_actions_container.h
@@ -259,6 +259,8 @@ class BrowserActionsContainer
const extensions::Extension* extension) OVERRIDE;
virtual void BrowserActionMoved(const extensions::Extension* extension,
int index) OVERRIDE;
+ virtual bool BrowserActionShowPopup(
+ const extensions::Extension* extension) OVERRIDE;
virtual void ModelLoaded() OVERRIDE;
void LoadImages();
@@ -309,9 +311,12 @@ class BrowserActionsContainer
// for incognito.
bool ShouldDisplayBrowserAction(const extensions::Extension* extension);
- // Show a popup.
- void ShowPopup(BrowserActionButton* button,
- ExtensionPopup::ShowAction show_action);
+ // Show a popup. Returns true if a new popup was shown. Showing the popup will
+ // grant tab permissions if |should_grant| is true. Popup's shown via an API
+ // should not grant permissions.
+ bool ShowPopup(BrowserActionButton* button,
+ ExtensionPopup::ShowAction show_action,
+ bool should_grant);
// The vector of browser actions (icons/image buttons for each action). Note
// that not every BrowserAction in the ToolbarModel will necessarily be in

Powered by Google App Engine
This is Rietveld 408576698