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 1924 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1935 void LocationBarViewGtk::PageActionViewGtk::InspectPopup( | 1935 void LocationBarViewGtk::PageActionViewGtk::InspectPopup( |
1936 ExtensionAction* action) { | 1936 ExtensionAction* action) { |
1937 ExtensionPopupGtk::Show( | 1937 ExtensionPopupGtk::Show( |
1938 action->GetPopupUrl(current_tab_id_), | 1938 action->GetPopupUrl(current_tab_id_), |
1939 owner_->browser_, | 1939 owner_->browser_, |
1940 event_box_.get(), | 1940 event_box_.get(), |
1941 ExtensionPopupGtk::SHOW_AND_INSPECT); | 1941 ExtensionPopupGtk::SHOW_AND_INSPECT); |
1942 } | 1942 } |
1943 | 1943 |
1944 void LocationBarViewGtk::PageActionViewGtk::ConnectPageActionAccelerator() { | 1944 void LocationBarViewGtk::PageActionViewGtk::ConnectPageActionAccelerator() { |
1945 const ExtensionSet* extensions = owner_->browser()->profile()-> | 1945 const extensions::ExtensionSet* extensions = |
1946 GetExtensionService()->extensions(); | 1946 owner_->browser()->profile()->GetExtensionService()->extensions(); |
1947 const Extension* extension = | 1947 const Extension* extension = |
1948 extensions->GetByID(page_action_->extension_id()); | 1948 extensions->GetByID(page_action_->extension_id()); |
1949 window_ = owner_->browser()->window()->GetNativeWindow(); | 1949 window_ = owner_->browser()->window()->GetNativeWindow(); |
1950 | 1950 |
1951 extensions::CommandService* command_service = | 1951 extensions::CommandService* command_service = |
1952 extensions::CommandService::Get(owner_->browser()->profile()); | 1952 extensions::CommandService::Get(owner_->browser()->profile()); |
1953 | 1953 |
1954 extensions::Command command_page_action; | 1954 extensions::Command command_page_action; |
1955 if (command_service->GetPageActionCommand( | 1955 if (command_service->GetPageActionCommand( |
1956 extension->id(), | 1956 extension->id(), |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2123 | 2123 |
2124 GdkEventButton event = {}; | 2124 GdkEventButton event = {}; |
2125 event.type = GDK_BUTTON_PRESS; | 2125 event.type = GDK_BUTTON_PRESS; |
2126 event.button = 1; | 2126 event.button = 1; |
2127 return view->OnButtonPressed(view->widget(), &event); | 2127 return view->OnButtonPressed(view->widget(), &event); |
2128 } | 2128 } |
2129 | 2129 |
2130 void LocationBarViewGtk::PageActionViewGtk::OnIconChanged() { | 2130 void LocationBarViewGtk::PageActionViewGtk::OnIconChanged() { |
2131 UpdateVisibility(owner_->GetWebContents(), current_url_); | 2131 UpdateVisibility(owner_->GetWebContents(), current_url_); |
2132 } | 2132 } |
OLD | NEW |