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

Unified Diff: chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc

Issue 9968076: Remove Inspect Popup command from browser actions. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Views compile failure Created 8 years, 8 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/gtk/browser_actions_toolbar_gtk.cc
diff --git a/chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc b/chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc
index 588def49b0e3ded74640f92b3e12a9c82d48101b..320863a3c683aa81d7be816621a145e4c2b43720 100644
--- a/chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc
+++ b/chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc
@@ -89,7 +89,6 @@ using ui::SimpleMenuModel;
class BrowserActionButton : public content::NotificationObserver,
public ImageLoadingTracker::Observer,
- public ExtensionContextMenuModel::PopupDelegate,
public MenuGtk::Delegate {
public:
BrowserActionButton(BrowserActionsToolbarGtk* toolbar,
@@ -241,7 +240,7 @@ class BrowserActionButton : public content::NotificationObserver,
return NULL;
context_menu_model_ =
- new ExtensionContextMenuModel(extension_, toolbar_->browser(), this);
+ new ExtensionContextMenuModel(extension_, toolbar_->browser());
context_menu_.reset(
new MenuGtk(this, context_menu_model_.get()));
return context_menu_.get();
@@ -267,7 +266,7 @@ class BrowserActionButton : public content::NotificationObserver,
// Returns true to prevent further processing of the event that caused us to
// show the popup, or false to continue processing.
- bool ShowPopup(bool devtools) {
+ bool ShowPopup() {
ExtensionAction* browser_action = extension_->browser_action();
int tab_id = toolbar_->GetCurrentTabId();
@@ -278,19 +277,13 @@ class BrowserActionButton : public content::NotificationObserver,
if (browser_action->HasPopup(tab_id)) {
ExtensionPopupGtk::Show(
- browser_action->GetPopupUrl(tab_id), toolbar_->browser(),
- widget(), devtools);
+ browser_action->GetPopupUrl(tab_id), toolbar_->browser(), widget());
return true;
}
return false;
}
- // ExtensionContextMenuModel::PopupDelegate implementation.
- virtual void InspectPopup(ExtensionAction* action) {
- ShowPopup(true);
- }
-
void SetImage(GdkPixbuf* image) {
if (!image_) {
image_ = gtk_image_new_from_pixbuf(image);
@@ -317,7 +310,7 @@ class BrowserActionButton : public content::NotificationObserver,
}
static void OnClicked(GtkWidget* widget, BrowserActionButton* action) {
- if (action->ShowPopup(false))
+ if (action->ShowPopup())
return;
ExtensionService* service =
@@ -796,9 +789,7 @@ void BrowserActionsToolbarGtk::ExecuteCommand(int command_id) {
if (browser_action->HasPopup(tab_id)) {
ExtensionPopupGtk::Show(
- browser_action->GetPopupUrl(tab_id), browser(),
- chevron(),
- false);
+ browser_action->GetPopupUrl(tab_id), browser(), chevron());
} else {
ExtensionService* service = browser()->profile()->GetExtensionService();
service->browser_event_router()->BrowserActionExecuted(

Powered by Google App Engine
This is Rietveld 408576698