| OLD | NEW |
| 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 #include "chrome/browser/ui/omnibox/alternate_nav_url_fetcher.h" | 65 #include "chrome/browser/ui/omnibox/alternate_nav_url_fetcher.h" |
| 66 #include "chrome/browser/ui/omnibox/location_bar_util.h" | 66 #include "chrome/browser/ui/omnibox/location_bar_util.h" |
| 67 #include "chrome/browser/ui/omnibox/omnibox_edit_model.h" | 67 #include "chrome/browser/ui/omnibox/omnibox_edit_model.h" |
| 68 #include "chrome/browser/ui/omnibox/omnibox_popup_model.h" | 68 #include "chrome/browser/ui/omnibox/omnibox_popup_model.h" |
| 69 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 69 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 70 #include "chrome/browser/ui/webui/extensions/extension_info_ui.h" | 70 #include "chrome/browser/ui/webui/extensions/extension_info_ui.h" |
| 71 #include "chrome/browser/ui/zoom/zoom_controller.h" | 71 #include "chrome/browser/ui/zoom/zoom_controller.h" |
| 72 #include "chrome/common/badge_util.h" | 72 #include "chrome/common/badge_util.h" |
| 73 #include "chrome/common/chrome_notification_types.h" | 73 #include "chrome/common/chrome_notification_types.h" |
| 74 #include "chrome/common/chrome_switches.h" | 74 #include "chrome/common/chrome_switches.h" |
| 75 #include "chrome/common/extensions/api/icons/icons_handler.h" |
| 75 #include "chrome/common/extensions/extension.h" | 76 #include "chrome/common/extensions/extension.h" |
| 76 #include "chrome/common/extensions/extension_manifest_constants.h" | 77 #include "chrome/common/extensions/extension_manifest_constants.h" |
| 77 #include "chrome/common/extensions/extension_resource.h" | 78 #include "chrome/common/extensions/extension_resource.h" |
| 78 #include "chrome/common/extensions/feature_switch.h" | 79 #include "chrome/common/extensions/feature_switch.h" |
| 79 #include "chrome/common/pref_names.h" | 80 #include "chrome/common/pref_names.h" |
| 80 #include "content/public/browser/navigation_entry.h" | 81 #include "content/public/browser/navigation_entry.h" |
| 81 #include "content/public/browser/notification_service.h" | 82 #include "content/public/browser/notification_service.h" |
| 82 #include "content/public/browser/web_contents.h" | 83 #include "content/public/browser/web_contents.h" |
| 83 #include "grit/generated_resources.h" | 84 #include "grit/generated_resources.h" |
| 84 #include "grit/theme_resources.h" | 85 #include "grit/theme_resources.h" |
| (...skipping 1720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1805 current_tab_id_(-1), | 1806 current_tab_id_(-1), |
| 1806 window_(NULL), | 1807 window_(NULL), |
| 1807 accel_group_(NULL), | 1808 accel_group_(NULL), |
| 1808 preview_enabled_(false), | 1809 preview_enabled_(false), |
| 1809 ALLOW_THIS_IN_INITIALIZER_LIST(scoped_icon_animation_observer_( | 1810 ALLOW_THIS_IN_INITIALIZER_LIST(scoped_icon_animation_observer_( |
| 1810 page_action->GetIconAnimation( | 1811 page_action->GetIconAnimation( |
| 1811 SessionID::IdForTab(owner->GetWebContents())), | 1812 SessionID::IdForTab(owner->GetWebContents())), |
| 1812 this)) { | 1813 this)) { |
| 1813 event_box_.Own(gtk_event_box_new()); | 1814 event_box_.Own(gtk_event_box_new()); |
| 1814 gtk_widget_set_size_request(event_box_.get(), | 1815 gtk_widget_set_size_request(event_box_.get(), |
| 1815 Extension::kPageActionIconMaxSize, | 1816 extensions::IconsInfo::kPageActionIconMaxSize, |
| 1816 Extension::kPageActionIconMaxSize); | 1817 extensions::IconsInfo::kPageActionIconMaxSize); |
| 1817 | 1818 |
| 1818 // Make the event box not visible so it does not paint a background. | 1819 // Make the event box not visible so it does not paint a background. |
| 1819 gtk_event_box_set_visible_window(GTK_EVENT_BOX(event_box_.get()), FALSE); | 1820 gtk_event_box_set_visible_window(GTK_EVENT_BOX(event_box_.get()), FALSE); |
| 1820 g_signal_connect(event_box_.get(), "button-press-event", | 1821 g_signal_connect(event_box_.get(), "button-press-event", |
| 1821 G_CALLBACK(&OnButtonPressedThunk), this); | 1822 G_CALLBACK(&OnButtonPressedThunk), this); |
| 1822 g_signal_connect_after(event_box_.get(), "expose-event", | 1823 g_signal_connect_after(event_box_.get(), "expose-event", |
| 1823 G_CALLBACK(OnExposeEventThunk), this); | 1824 G_CALLBACK(OnExposeEventThunk), this); |
| 1824 g_signal_connect(event_box_.get(), "realize", | 1825 g_signal_connect(event_box_.get(), "realize", |
| 1825 G_CALLBACK(OnRealizeThunk), this); | 1826 G_CALLBACK(OnRealizeThunk), this); |
| 1826 | 1827 |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2102 } | 2103 } |
| 2103 | 2104 |
| 2104 void LocationBarViewGtk::PageActionViewGtk::InspectPopup( | 2105 void LocationBarViewGtk::PageActionViewGtk::InspectPopup( |
| 2105 ExtensionAction* action) { | 2106 ExtensionAction* action) { |
| 2106 ExtensionPopupGtk::Show( | 2107 ExtensionPopupGtk::Show( |
| 2107 action->GetPopupUrl(current_tab_id_), | 2108 action->GetPopupUrl(current_tab_id_), |
| 2108 owner_->browser_, | 2109 owner_->browser_, |
| 2109 event_box_.get(), | 2110 event_box_.get(), |
| 2110 ExtensionPopupGtk::SHOW_AND_INSPECT); | 2111 ExtensionPopupGtk::SHOW_AND_INSPECT); |
| 2111 } | 2112 } |
| OLD | NEW |