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

Side by Side Diff: chrome/browser/ui/views/toolbar/browser_actions_container.h

Issue 575093003: Revert of Track the active ExtensionKeybindingRegistry and make it available to EventRewriter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkcr
Patch Set: Created 6 years, 3 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef CHROME_BROWSER_UI_VIEWS_TOOLBAR_BROWSER_ACTIONS_CONTAINER_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_TOOLBAR_BROWSER_ACTIONS_CONTAINER_H_
6 #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_BROWSER_ACTIONS_CONTAINER_H_ 6 #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_BROWSER_ACTIONS_CONTAINER_H_
7 7
8 #include "base/observer_list.h" 8 #include "base/observer_list.h"
9 #include "chrome/browser/extensions/extension_keybinding_registry.h" 9 #include "chrome/browser/extensions/extension_keybinding_registry.h"
10 #include "chrome/browser/extensions/extension_toolbar_model.h" 10 #include "chrome/browser/extensions/extension_toolbar_model.h"
11 #include "chrome/browser/ui/views/extensions/browser_action_overflow_menu_contro ller.h" 11 #include "chrome/browser/ui/views/extensions/browser_action_overflow_menu_contro ller.h"
12 #include "chrome/browser/ui/views/extensions/extension_keybinding_registry_views .h"
13 #include "chrome/browser/ui/views/toolbar/browser_action_view.h" 12 #include "chrome/browser/ui/views/toolbar/browser_action_view.h"
14 #include "ui/gfx/animation/animation_delegate.h" 13 #include "ui/gfx/animation/animation_delegate.h"
15 #include "ui/gfx/animation/tween.h" 14 #include "ui/gfx/animation/tween.h"
16 #include "ui/views/controls/button/menu_button_listener.h" 15 #include "ui/views/controls/button/menu_button_listener.h"
17 #include "ui/views/controls/resize_area_delegate.h" 16 #include "ui/views/controls/resize_area_delegate.h"
18 #include "ui/views/drag_controller.h" 17 #include "ui/views/drag_controller.h"
19 #include "ui/views/view.h" 18 #include "ui/views/view.h"
20 19
21 class BrowserActionsContainerObserver; 20 class BrowserActionsContainerObserver;
21 class ExtensionKeybindingRegistryViews;
22 class ExtensionPopup; 22 class ExtensionPopup;
23 23
24 namespace extensions { 24 namespace extensions {
25 class ActiveTabPermissionGranter; 25 class ActiveTabPermissionGranter;
26 class Command; 26 class Command;
27 class Extension; 27 class Extension;
28 } 28 }
29 29
30 namespace gfx { 30 namespace gfx {
31 class SlideAnimation; 31 class SlideAnimation;
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 // Whether we are performing resize animation on the container. 151 // Whether we are performing resize animation on the container.
152 bool animating() const { return animation_target_size_ > 0; } 152 bool animating() const { return animation_target_size_ > 0; }
153 153
154 // Returns the chevron, if any. 154 // Returns the chevron, if any.
155 views::View* chevron() { return chevron_; } 155 views::View* chevron() { return chevron_; }
156 const views::View* chevron() const { return chevron_; } 156 const views::View* chevron() const { return chevron_; }
157 157
158 // Returns the profile this container is associated with. 158 // Returns the profile this container is associated with.
159 Profile* profile() const { return profile_; } 159 Profile* profile() const { return profile_; }
160 160
161 // The class that registers for keyboard shortcuts for extension commands.
162 extensions::ExtensionKeybindingRegistry* extension_keybinding_registry() {
163 return extension_keybinding_registry_.get();
164 }
165
166 // Get a particular browser action view. 161 // Get a particular browser action view.
167 BrowserActionView* GetBrowserActionViewAt(int index) { 162 BrowserActionView* GetBrowserActionViewAt(int index) {
168 return browser_action_views_[index]; 163 return browser_action_views_[index];
169 } 164 }
170 165
171 // Returns the BrowserActionView* associated with the given |extension|, or 166 // Returns the BrowserActionView* associated with the given |extension|, or
172 // NULL if none exists. 167 // NULL if none exists.
173 BrowserActionView* GetViewForExtension( 168 BrowserActionView* GetViewForExtension(
174 const extensions::Extension* extension); 169 const extensions::Extension* extension);
175 170
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 ObserverList<BrowserActionsContainerObserver> observers_; 433 ObserverList<BrowserActionsContainerObserver> observers_;
439 434
440 // The maximum number of icons to show per row when in overflow mode (showing 435 // The maximum number of icons to show per row when in overflow mode (showing
441 // icons in the application menu). 436 // icons in the application menu).
442 static int icons_per_overflow_menu_row_; 437 static int icons_per_overflow_menu_row_;
443 438
444 DISALLOW_COPY_AND_ASSIGN(BrowserActionsContainer); 439 DISALLOW_COPY_AND_ASSIGN(BrowserActionsContainer);
445 }; 440 };
446 441
447 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_BROWSER_ACTIONS_CONTAINER_H_ 442 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_BROWSER_ACTIONS_CONTAINER_H_
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_manager.cc ('k') | chrome/browser/ui/views/toolbar/browser_actions_container.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698