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

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

Issue 102103005: Move c/c/e/extension_set to top-level extensions/ (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
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_switches.h" 74 #include "chrome/common/chrome_switches.h"
75 #include "chrome/common/extensions/manifest_handlers/icons_handler.h" 75 #include "chrome/common/extensions/manifest_handlers/icons_handler.h"
76 #include "chrome/common/pref_names.h" 76 #include "chrome/common/pref_names.h"
77 #include "content/public/browser/navigation_entry.h" 77 #include "content/public/browser/navigation_entry.h"
78 #include "content/public/browser/notification_service.h" 78 #include "content/public/browser/notification_service.h"
79 #include "content/public/browser/web_contents.h" 79 #include "content/public/browser/web_contents.h"
80 #include "extensions/common/extension.h" 80 #include "extensions/common/extension.h"
81 #include "extensions/common/extension_set.h"
81 #include "extensions/common/feature_switch.h" 82 #include "extensions/common/feature_switch.h"
82 #include "grit/generated_resources.h" 83 #include "grit/generated_resources.h"
83 #include "grit/theme_resources.h" 84 #include "grit/theme_resources.h"
84 #include "net/base/net_util.h" 85 #include "net/base/net_util.h"
85 #include "ui/base/accelerators/platform_accelerator_gtk.h" 86 #include "ui/base/accelerators/platform_accelerator_gtk.h"
86 #include "ui/base/accessibility/accessibility_types.h" 87 #include "ui/base/accessibility/accessibility_types.h"
87 #include "ui/base/dragdrop/gtk_dnd_util.h" 88 #include "ui/base/dragdrop/gtk_dnd_util.h"
88 #include "ui/base/gtk/gtk_hig_constants.h" 89 #include "ui/base/gtk/gtk_hig_constants.h"
89 #include "ui/base/gtk/gtk_signal_registrar.h" 90 #include "ui/base/gtk/gtk_signal_registrar.h"
90 #include "ui/base/l10n/l10n_util.h" 91 #include "ui/base/l10n/l10n_util.h"
(...skipping 1845 matching lines...) Expand 10 before | Expand all | Expand 10 after
1936 void LocationBarViewGtk::PageActionViewGtk::InspectPopup( 1937 void LocationBarViewGtk::PageActionViewGtk::InspectPopup(
1937 ExtensionAction* action) { 1938 ExtensionAction* action) {
1938 ExtensionPopupGtk::Show( 1939 ExtensionPopupGtk::Show(
1939 action->GetPopupUrl(current_tab_id_), 1940 action->GetPopupUrl(current_tab_id_),
1940 owner_->browser_, 1941 owner_->browser_,
1941 event_box_.get(), 1942 event_box_.get(),
1942 ExtensionPopupGtk::SHOW_AND_INSPECT); 1943 ExtensionPopupGtk::SHOW_AND_INSPECT);
1943 } 1944 }
1944 1945
1945 void LocationBarViewGtk::PageActionViewGtk::ConnectPageActionAccelerator() { 1946 void LocationBarViewGtk::PageActionViewGtk::ConnectPageActionAccelerator() {
1946 const ExtensionSet* extensions = owner_->browser()->profile()-> 1947 const extensions::ExtensionSet* extensions =
1947 GetExtensionService()->extensions(); 1948 owner_->browser()->profile()->GetExtensionService()->extensions();
1948 const Extension* extension = 1949 const Extension* extension =
1949 extensions->GetByID(page_action_->extension_id()); 1950 extensions->GetByID(page_action_->extension_id());
1950 window_ = owner_->browser()->window()->GetNativeWindow(); 1951 window_ = owner_->browser()->window()->GetNativeWindow();
1951 1952
1952 extensions::CommandService* command_service = 1953 extensions::CommandService* command_service =
1953 extensions::CommandService::Get(owner_->browser()->profile()); 1954 extensions::CommandService::Get(owner_->browser()->profile());
1954 1955
1955 extensions::Command command_page_action; 1956 extensions::Command command_page_action;
1956 if (command_service->GetPageActionCommand( 1957 if (command_service->GetPageActionCommand(
1957 extension->id(), 1958 extension->id(),
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
2124 2125
2125 GdkEventButton event = {}; 2126 GdkEventButton event = {};
2126 event.type = GDK_BUTTON_PRESS; 2127 event.type = GDK_BUTTON_PRESS;
2127 event.button = 1; 2128 event.button = 1;
2128 return view->OnButtonPressed(view->widget(), &event); 2129 return view->OnButtonPressed(view->widget(), &event);
2129 } 2130 }
2130 2131
2131 void LocationBarViewGtk::PageActionViewGtk::OnIconChanged() { 2132 void LocationBarViewGtk::PageActionViewGtk::OnIconChanged() {
2132 UpdateVisibility(owner_->GetWebContents(), current_url_); 2133 UpdateVisibility(owner_->GetWebContents(), current_url_);
2133 } 2134 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/fullscreen/fullscreen_exit_bubble_type.cc ('k') | chrome/browser/ui/gtk/script_bubble_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698