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

Side by Side Diff: chrome/browser/ui/gtk/location_bar_view_gtk.cc

Issue 9968076: Remove Inspect Popup command from browser actions. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Woopsies 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/gtk/location_bar_view_gtk.h" 5 #include "chrome/browser/ui/gtk/location_bar_view_gtk.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 1664 matching lines...) Expand 10 before | Expand all | Expand 10 after
1675 DCHECK_EQ(type, chrome::NOTIFICATION_WINDOW_CLOSED); 1675 DCHECK_EQ(type, chrome::NOTIFICATION_WINDOW_CLOSED);
1676 DisconnectPageActionAccelerator(); 1676 DisconnectPageActionAccelerator();
1677 } 1677 }
1678 1678
1679 void LocationBarViewGtk::EnabledStateChangedForCommand(int id, bool enabled) { 1679 void LocationBarViewGtk::EnabledStateChangedForCommand(int id, bool enabled) {
1680 DCHECK_EQ(id, IDC_CHROME_TO_MOBILE_PAGE); 1680 DCHECK_EQ(id, IDC_CHROME_TO_MOBILE_PAGE);
1681 if (enabled != gtk_widget_get_visible(chrome_to_mobile_view_.get())) 1681 if (enabled != gtk_widget_get_visible(chrome_to_mobile_view_.get()))
1682 UpdateChromeToMobileIcon(); 1682 UpdateChromeToMobileIcon();
1683 } 1683 }
1684 1684
1685 void LocationBarViewGtk::PageActionViewGtk::InspectPopup(
1686 ExtensionAction* action) {
1687 ShowPopup(true);
1688 }
1689
1690 bool LocationBarViewGtk::PageActionViewGtk::ShowPopup(bool devtools) { 1685 bool LocationBarViewGtk::PageActionViewGtk::ShowPopup(bool devtools) {
1691 if (!page_action_->HasPopup(current_tab_id_)) 1686 if (!page_action_->HasPopup(current_tab_id_))
1692 return false; 1687 return false;
1693 1688
1694 ExtensionPopupGtk::Show( 1689 ExtensionPopupGtk::Show(
1695 page_action_->GetPopupUrl(current_tab_id_), 1690 page_action_->GetPopupUrl(current_tab_id_),
1696 owner_->browser_, 1691 owner_->browser_,
1697 event_box_.get(), 1692 event_box_.get(),
1698 devtools); 1693 devtools);
1699 return true; 1694 return true;
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
1757 service->browser_event_router()->PageActionExecuted(profile, 1752 service->browser_event_router()->PageActionExecuted(profile,
1758 page_action_->extension_id(), page_action_->id(), current_tab_id_, 1753 page_action_->extension_id(), page_action_->id(), current_tab_id_,
1759 current_url_.spec(), event->button); 1754 current_url_.spec(), event->button);
1760 } 1755 }
1761 } else { 1756 } else {
1762 const Extension* extension = profile->GetExtensionService()-> 1757 const Extension* extension = profile->GetExtensionService()->
1763 GetExtensionById(page_action()->extension_id(), false); 1758 GetExtensionById(page_action()->extension_id(), false);
1764 1759
1765 if (extension->ShowConfigureContextMenus()) { 1760 if (extension->ShowConfigureContextMenus()) {
1766 context_menu_model_ = 1761 context_menu_model_ =
1767 new ExtensionContextMenuModel(extension, owner_->browser_, this); 1762 new ExtensionContextMenuModel(extension, owner_->browser_);
1768 context_menu_.reset( 1763 context_menu_.reset(
1769 new MenuGtk(NULL, context_menu_model_.get())); 1764 new MenuGtk(NULL, context_menu_model_.get()));
1770 context_menu_->PopupForWidget(sender, event->button, event->time); 1765 context_menu_->PopupForWidget(sender, event->button, event->time);
1771 } 1766 }
1772 } 1767 }
1773 1768
1774 return TRUE; 1769 return TRUE;
1775 } 1770 }
1776 1771
1777 gboolean LocationBarViewGtk::PageActionViewGtk::OnExposeEvent( 1772 gboolean LocationBarViewGtk::PageActionViewGtk::OnExposeEvent(
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
1809 GdkModifierType modifier, 1804 GdkModifierType modifier,
1810 void* user_data) { 1805 void* user_data) {
1811 PageActionViewGtk* view = static_cast<PageActionViewGtk*>(user_data); 1806 PageActionViewGtk* view = static_cast<PageActionViewGtk*>(user_data);
1812 if (!gtk_widget_get_visible(view->widget())) 1807 if (!gtk_widget_get_visible(view->widget()))
1813 return FALSE; 1808 return FALSE;
1814 1809
1815 GdkEventButton event = {}; 1810 GdkEventButton event = {};
1816 event.button = 1; 1811 event.button = 1;
1817 return view->OnButtonPressed(view->widget(), &event); 1812 return view->OnButtonPressed(view->widget(), &event);
1818 } 1813 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698