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

Unified Diff: chrome/browser/gtk/location_bar_view_gtk.cc

Issue 1107007: Extension context menu refactor (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 9 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/gtk/location_bar_view_gtk.cc
===================================================================
--- chrome/browser/gtk/location_bar_view_gtk.cc (revision 41960)
+++ chrome/browser/gtk/location_bar_view_gtk.cc (working copy)
@@ -22,7 +22,6 @@
#include "chrome/browser/content_setting_bubble_model.h"
#include "chrome/browser/content_setting_image_model.h"
#include "chrome/browser/extensions/extension_accessibility_api_constants.h"
-#include "chrome/browser/extensions/extension_action_context_menu_model.h"
#include "chrome/browser/extensions/extension_browser_event_router.h"
#include "chrome/browser/extensions/extension_tabs_module.h"
#include "chrome/browser/extensions/extensions_service.h"
@@ -137,8 +136,6 @@
};
LocationBarViewGtk::LocationBarViewGtk(
- CommandUpdater* command_updater,
- ToolbarModel* toolbar_model,
const BubblePositioner* bubble_positioner,
Browser* browser)
: security_icon_event_box_(NULL),
@@ -154,8 +151,8 @@
tab_to_search_hint_trailing_label_(NULL),
type_to_search_hint_(NULL),
profile_(NULL),
- command_updater_(command_updater),
- toolbar_model_(toolbar_model),
+ command_updater_(browser->command_updater()),
+ toolbar_model_(browser->toolbar_model()),
browser_(browser),
bubble_positioner_(bubble_positioner),
disposition_(CURRENT_TAB),
@@ -1195,6 +1192,12 @@
OnButtonPressed(widget(), &event);
}
+void LocationBarViewGtk::PageActionViewGtk::InspectPopup(
+ ExtensionAction* action) {
+ // TODO(estade): http://crbug.com/24477
+ NOTIMPLEMENTED();
+}
+
gboolean LocationBarViewGtk::PageActionViewGtk::OnButtonPressed(
GtkWidget* sender,
GdkEvent* event) {
@@ -1217,11 +1220,8 @@
Extension* extension = profile_->GetExtensionsService()->GetExtensionById(
page_action()->extension_id(), false);
- // TODO(rafaelw): support inspecting popups.
- if (!context_menu_model_.get())
- context_menu_model_.reset(new ExtensionActionContextMenuModel(extension,
- page_action_, profile_->GetPrefs(), NULL));
-
+ context_menu_model_.reset(
+ new ExtensionContextMenuModel(extension, owner_->browser_, this));
context_menu_.reset(
new MenuGtk(NULL, context_menu_model_.get()));
context_menu_->Popup(sender, event);

Powered by Google App Engine
This is Rietveld 408576698