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

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

Issue 11786003: Move Icons out of Extension class (Closed) Base URL: http://git.chromium.org/chromium/src.git@dc_unref_browser_action
Patch Set: License year update Created 7 years, 11 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 #include "chrome/browser/ui/gtk/zoom_bubble_gtk.h" 66 #include "chrome/browser/ui/gtk/zoom_bubble_gtk.h"
67 #include "chrome/browser/ui/intents/web_intent_picker_controller.h" 67 #include "chrome/browser/ui/intents/web_intent_picker_controller.h"
68 #include "chrome/browser/ui/omnibox/location_bar_util.h" 68 #include "chrome/browser/ui/omnibox/location_bar_util.h"
69 #include "chrome/browser/ui/omnibox/omnibox_edit_model.h" 69 #include "chrome/browser/ui/omnibox/omnibox_edit_model.h"
70 #include "chrome/browser/ui/omnibox/omnibox_popup_model.h" 70 #include "chrome/browser/ui/omnibox/omnibox_popup_model.h"
71 #include "chrome/browser/ui/webui/extensions/extension_info_ui.h" 71 #include "chrome/browser/ui/webui/extensions/extension_info_ui.h"
72 #include "chrome/browser/ui/zoom/zoom_controller.h" 72 #include "chrome/browser/ui/zoom/zoom_controller.h"
73 #include "chrome/common/badge_util.h" 73 #include "chrome/common/badge_util.h"
74 #include "chrome/common/chrome_notification_types.h" 74 #include "chrome/common/chrome_notification_types.h"
75 #include "chrome/common/chrome_switches.h" 75 #include "chrome/common/chrome_switches.h"
76 #include "chrome/common/extensions/api/icons/icons_handler.h"
76 #include "chrome/common/extensions/extension.h" 77 #include "chrome/common/extensions/extension.h"
77 #include "chrome/common/extensions/extension_manifest_constants.h" 78 #include "chrome/common/extensions/extension_manifest_constants.h"
78 #include "chrome/common/extensions/extension_resource.h" 79 #include "chrome/common/extensions/extension_resource.h"
79 #include "chrome/common/extensions/feature_switch.h" 80 #include "chrome/common/extensions/feature_switch.h"
80 #include "chrome/common/pref_names.h" 81 #include "chrome/common/pref_names.h"
81 #include "content/public/browser/navigation_entry.h" 82 #include "content/public/browser/navigation_entry.h"
82 #include "content/public/browser/notification_service.h" 83 #include "content/public/browser/notification_service.h"
83 #include "content/public/browser/web_contents.h" 84 #include "content/public/browser/web_contents.h"
84 #include "grit/generated_resources.h" 85 #include "grit/generated_resources.h"
85 #include "grit/theme_resources.h" 86 #include "grit/theme_resources.h"
(...skipping 1801 matching lines...) Expand 10 before | Expand all | Expand 10 after
1887 current_tab_id_(-1), 1888 current_tab_id_(-1),
1888 window_(NULL), 1889 window_(NULL),
1889 accel_group_(NULL), 1890 accel_group_(NULL),
1890 preview_enabled_(false), 1891 preview_enabled_(false),
1891 ALLOW_THIS_IN_INITIALIZER_LIST(scoped_icon_animation_observer_( 1892 ALLOW_THIS_IN_INITIALIZER_LIST(scoped_icon_animation_observer_(
1892 page_action->GetIconAnimation( 1893 page_action->GetIconAnimation(
1893 SessionID::IdForTab(owner->GetWebContents())), 1894 SessionID::IdForTab(owner->GetWebContents())),
1894 this)) { 1895 this)) {
1895 event_box_.Own(gtk_event_box_new()); 1896 event_box_.Own(gtk_event_box_new());
1896 gtk_widget_set_size_request(event_box_.get(), 1897 gtk_widget_set_size_request(event_box_.get(),
1897 Extension::kPageActionIconMaxSize, 1898 extensions::IconsInfo::kPageActionIconMaxSize,
1898 Extension::kPageActionIconMaxSize); 1899 extensions::IconsInfo::kPageActionIconMaxSize);
1899 1900
1900 // Make the event box not visible so it does not paint a background. 1901 // Make the event box not visible so it does not paint a background.
1901 gtk_event_box_set_visible_window(GTK_EVENT_BOX(event_box_.get()), FALSE); 1902 gtk_event_box_set_visible_window(GTK_EVENT_BOX(event_box_.get()), FALSE);
1902 g_signal_connect(event_box_.get(), "button-press-event", 1903 g_signal_connect(event_box_.get(), "button-press-event",
1903 G_CALLBACK(&OnButtonPressedThunk), this); 1904 G_CALLBACK(&OnButtonPressedThunk), this);
1904 g_signal_connect_after(event_box_.get(), "expose-event", 1905 g_signal_connect_after(event_box_.get(), "expose-event",
1905 G_CALLBACK(OnExposeEventThunk), this); 1906 G_CALLBACK(OnExposeEventThunk), this);
1906 g_signal_connect(event_box_.get(), "realize", 1907 g_signal_connect(event_box_.get(), "realize",
1907 G_CALLBACK(OnRealizeThunk), this); 1908 G_CALLBACK(OnRealizeThunk), this);
1908 1909
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
2184 } 2185 }
2185 2186
2186 void LocationBarViewGtk::PageActionViewGtk::InspectPopup( 2187 void LocationBarViewGtk::PageActionViewGtk::InspectPopup(
2187 ExtensionAction* action) { 2188 ExtensionAction* action) {
2188 ExtensionPopupGtk::Show( 2189 ExtensionPopupGtk::Show(
2189 action->GetPopupUrl(current_tab_id_), 2190 action->GetPopupUrl(current_tab_id_),
2190 owner_->browser_, 2191 owner_->browser_,
2191 event_box_.get(), 2192 event_box_.get(),
2192 ExtensionPopupGtk::SHOW_AND_INSPECT); 2193 ExtensionPopupGtk::SHOW_AND_INSPECT);
2193 } 2194 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698