| 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/intents/web_intent_picker_controller.h" | 65 #include "chrome/browser/ui/intents/web_intent_picker_controller.h" |
| 66 #include "chrome/browser/ui/omnibox/alternate_nav_url_fetcher.h" | 66 #include "chrome/browser/ui/omnibox/alternate_nav_url_fetcher.h" |
| 67 #include "chrome/browser/ui/omnibox/location_bar_util.h" | 67 #include "chrome/browser/ui/omnibox/location_bar_util.h" |
| 68 #include "chrome/browser/ui/omnibox/omnibox_edit_model.h" | 68 #include "chrome/browser/ui/omnibox/omnibox_edit_model.h" |
| 69 #include "chrome/browser/ui/omnibox/omnibox_popup_model.h" | 69 #include "chrome/browser/ui/omnibox/omnibox_popup_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 1801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1886 current_tab_id_(-1), | 1887 current_tab_id_(-1), |
| 1887 window_(NULL), | 1888 window_(NULL), |
| 1888 accel_group_(NULL), | 1889 accel_group_(NULL), |
| 1889 preview_enabled_(false), | 1890 preview_enabled_(false), |
| 1890 ALLOW_THIS_IN_INITIALIZER_LIST(scoped_icon_animation_observer_( | 1891 ALLOW_THIS_IN_INITIALIZER_LIST(scoped_icon_animation_observer_( |
| 1891 page_action->GetIconAnimation( | 1892 page_action->GetIconAnimation( |
| 1892 SessionID::IdForTab(owner->GetWebContents())), | 1893 SessionID::IdForTab(owner->GetWebContents())), |
| 1893 this)) { | 1894 this)) { |
| 1894 event_box_.Own(gtk_event_box_new()); | 1895 event_box_.Own(gtk_event_box_new()); |
| 1895 gtk_widget_set_size_request(event_box_.get(), | 1896 gtk_widget_set_size_request(event_box_.get(), |
| 1896 Extension::kPageActionIconMaxSize, | 1897 extensions::IconsInfo::kPageActionIconMaxSize, |
| 1897 Extension::kPageActionIconMaxSize); | 1898 extensions::IconsInfo::kPageActionIconMaxSize); |
| 1898 | 1899 |
| 1899 // Make the event box not visible so it does not paint a background. | 1900 // Make the event box not visible so it does not paint a background. |
| 1900 gtk_event_box_set_visible_window(GTK_EVENT_BOX(event_box_.get()), FALSE); | 1901 gtk_event_box_set_visible_window(GTK_EVENT_BOX(event_box_.get()), FALSE); |
| 1901 g_signal_connect(event_box_.get(), "button-press-event", | 1902 g_signal_connect(event_box_.get(), "button-press-event", |
| 1902 G_CALLBACK(&OnButtonPressedThunk), this); | 1903 G_CALLBACK(&OnButtonPressedThunk), this); |
| 1903 g_signal_connect_after(event_box_.get(), "expose-event", | 1904 g_signal_connect_after(event_box_.get(), "expose-event", |
| 1904 G_CALLBACK(OnExposeEventThunk), this); | 1905 G_CALLBACK(OnExposeEventThunk), this); |
| 1905 g_signal_connect(event_box_.get(), "realize", | 1906 g_signal_connect(event_box_.get(), "realize", |
| 1906 G_CALLBACK(OnRealizeThunk), this); | 1907 G_CALLBACK(OnRealizeThunk), this); |
| 1907 | 1908 |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2182 } | 2183 } |
| 2183 | 2184 |
| 2184 void LocationBarViewGtk::PageActionViewGtk::InspectPopup( | 2185 void LocationBarViewGtk::PageActionViewGtk::InspectPopup( |
| 2185 ExtensionAction* action) { | 2186 ExtensionAction* action) { |
| 2186 ExtensionPopupGtk::Show( | 2187 ExtensionPopupGtk::Show( |
| 2187 action->GetPopupUrl(current_tab_id_), | 2188 action->GetPopupUrl(current_tab_id_), |
| 2188 owner_->browser_, | 2189 owner_->browser_, |
| 2189 event_box_.get(), | 2190 event_box_.get(), |
| 2190 ExtensionPopupGtk::SHOW_AND_INSPECT); | 2191 ExtensionPopupGtk::SHOW_AND_INSPECT); |
| 2191 } | 2192 } |
| OLD | NEW |