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

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

Issue 10544195: Show an extension info bubble when a script badge is clicked. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rename resources Created 8 years, 6 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 | Annotate | Revision Log
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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 #include "chrome/browser/ui/gtk/first_run_bubble.h" 52 #include "chrome/browser/ui/gtk/first_run_bubble.h"
53 #include "chrome/browser/ui/gtk/gtk_theme_service.h" 53 #include "chrome/browser/ui/gtk/gtk_theme_service.h"
54 #include "chrome/browser/ui/gtk/gtk_util.h" 54 #include "chrome/browser/ui/gtk/gtk_util.h"
55 #include "chrome/browser/ui/gtk/nine_box.h" 55 #include "chrome/browser/ui/gtk/nine_box.h"
56 #include "chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.h" 56 #include "chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.h"
57 #include "chrome/browser/ui/gtk/rounded_window.h" 57 #include "chrome/browser/ui/gtk/rounded_window.h"
58 #include "chrome/browser/ui/gtk/view_id_util.h" 58 #include "chrome/browser/ui/gtk/view_id_util.h"
59 #include "chrome/browser/ui/gtk/zoom_bubble_gtk.h" 59 #include "chrome/browser/ui/gtk/zoom_bubble_gtk.h"
60 #include "chrome/browser/ui/omnibox/location_bar_util.h" 60 #include "chrome/browser/ui/omnibox/location_bar_util.h"
61 #include "chrome/browser/ui/tab_contents/tab_contents.h" 61 #include "chrome/browser/ui/tab_contents/tab_contents.h"
62 #include "chrome/browser/ui/webui/extensions/extension_info_ui.h"
62 #include "chrome/browser/ui/zoom/zoom_controller.h" 63 #include "chrome/browser/ui/zoom/zoom_controller.h"
63 #include "chrome/common/chrome_notification_types.h" 64 #include "chrome/common/chrome_notification_types.h"
64 #include "chrome/common/extensions/extension.h" 65 #include "chrome/common/extensions/extension.h"
65 #include "chrome/common/extensions/extension_action.h" 66 #include "chrome/common/extensions/extension_action.h"
66 #include "chrome/common/extensions/extension_manifest_constants.h" 67 #include "chrome/common/extensions/extension_manifest_constants.h"
67 #include "chrome/common/extensions/extension_resource.h" 68 #include "chrome/common/extensions/extension_resource.h"
68 #include "chrome/common/pref_names.h" 69 #include "chrome/common/pref_names.h"
69 #include "content/public/browser/navigation_entry.h" 70 #include "content/public/browser/navigation_entry.h"
70 #include "content/public/browser/notification_service.h" 71 #include "content/public/browser/notification_service.h"
71 #include "content/public/browser/web_contents.h" 72 #include "content/public/browser/web_contents.h"
(...skipping 1807 matching lines...) Expand 10 before | Expand all | Expand 10 after
1879 event_box_.get()); 1880 event_box_.get());
1880 break; 1881 break;
1881 1882
1882 case LocationBarController::ACTION_SHOW_CONTEXT_MENU: 1883 case LocationBarController::ACTION_SHOW_CONTEXT_MENU:
1883 context_menu_model_ = 1884 context_menu_model_ =
1884 new ExtensionContextMenuModel(extension, owner_->browser_); 1885 new ExtensionContextMenuModel(extension, owner_->browser_);
1885 context_menu_.reset( 1886 context_menu_.reset(
1886 new MenuGtk(NULL, context_menu_model_.get())); 1887 new MenuGtk(NULL, context_menu_model_.get()));
1887 context_menu_->PopupForWidget(sender, event->button, event->time); 1888 context_menu_->PopupForWidget(sender, event->button, event->time);
1888 break; 1889 break;
1890
1891 case LocationBarController::ACTION_SHOW_SCRIPT_POPUP:
1892 ExtensionPopupGtk::Show(
1893 ExtensionInfoUI::GetURL(extension->id()),
1894 owner_->browser_,
1895 event_box_.get());
1896 break;
1889 } 1897 }
1890 1898
1891 return TRUE; 1899 return TRUE;
1892 } 1900 }
1893 1901
1894 gboolean LocationBarViewGtk::PageActionViewGtk::OnExposeEvent( 1902 gboolean LocationBarViewGtk::PageActionViewGtk::OnExposeEvent(
1895 GtkWidget* widget, 1903 GtkWidget* widget,
1896 GdkEventExpose* event) { 1904 GdkEventExpose* event) {
1897 TRACE_EVENT0("ui::gtk", "LocationBarViewGtk::PageActionViewGtk::OnExpose"); 1905 TRACE_EVENT0("ui::gtk", "LocationBarViewGtk::PageActionViewGtk::OnExpose");
1898 WebContents* contents = owner_->GetWebContents(); 1906 WebContents* contents = owner_->GetWebContents();
(...skipping 27 matching lines...) Expand all
1926 GdkModifierType modifier, 1934 GdkModifierType modifier,
1927 void* user_data) { 1935 void* user_data) {
1928 PageActionViewGtk* view = static_cast<PageActionViewGtk*>(user_data); 1936 PageActionViewGtk* view = static_cast<PageActionViewGtk*>(user_data);
1929 if (!gtk_widget_get_visible(view->widget())) 1937 if (!gtk_widget_get_visible(view->widget()))
1930 return FALSE; 1938 return FALSE;
1931 1939
1932 GdkEventButton event = {}; 1940 GdkEventButton event = {};
1933 event.button = 1; 1941 event.button = 1;
1934 return view->OnButtonPressed(view->widget(), &event); 1942 return view->OnButtonPressed(view->widget(), &event);
1935 } 1943 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698