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); |