OLD | NEW |
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" |
12 #include "chrome/browser/ui/views/toolbar/browser_action_view.h" | 13 #include "chrome/browser/ui/views/toolbar/browser_action_view.h" |
13 #include "ui/gfx/animation/animation_delegate.h" | 14 #include "ui/gfx/animation/animation_delegate.h" |
14 #include "ui/gfx/animation/tween.h" | 15 #include "ui/gfx/animation/tween.h" |
15 #include "ui/views/controls/button/menu_button_listener.h" | 16 #include "ui/views/controls/button/menu_button_listener.h" |
16 #include "ui/views/controls/resize_area_delegate.h" | 17 #include "ui/views/controls/resize_area_delegate.h" |
17 #include "ui/views/drag_controller.h" | 18 #include "ui/views/drag_controller.h" |
18 #include "ui/views/view.h" | 19 #include "ui/views/view.h" |
19 | 20 |
20 class BrowserActionsContainerObserver; | 21 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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 // Whether we are performing resize animation on the container. | 147 // Whether we are performing resize animation on the container. |
148 bool animating() const { return animation_target_size_ > 0; } | 148 bool animating() const { return animation_target_size_ > 0; } |
149 | 149 |
150 // Returns the chevron, if any. | 150 // Returns the chevron, if any. |
151 views::View* chevron() { return chevron_; } | 151 views::View* chevron() { return chevron_; } |
152 const views::View* chevron() const { return chevron_; } | 152 const views::View* chevron() const { return chevron_; } |
153 | 153 |
154 // Returns the profile this container is associated with. | 154 // Returns the profile this container is associated with. |
155 Profile* profile() const { return profile_; } | 155 Profile* profile() const { return profile_; } |
156 | 156 |
| 157 // The class that registers for keyboard shortcuts for extension commands. |
| 158 extensions::ExtensionKeybindingRegistry* extension_keybinding_registry() { |
| 159 return extension_keybinding_registry_.get(); |
| 160 } |
| 161 |
157 // Get a particular browser action view. | 162 // Get a particular browser action view. |
158 BrowserActionView* GetBrowserActionViewAt(int index) { | 163 BrowserActionView* GetBrowserActionViewAt(int index) { |
159 return browser_action_views_[index]; | 164 return browser_action_views_[index]; |
160 } | 165 } |
161 | 166 |
162 // Returns the BrowserActionView* associated with the given |extension|, or | 167 // Returns the BrowserActionView* associated with the given |extension|, or |
163 // NULL if none exists. | 168 // NULL if none exists. |
164 BrowserActionView* GetViewForExtension( | 169 BrowserActionView* GetViewForExtension( |
165 const extensions::Extension* extension); | 170 const extensions::Extension* extension); |
166 | 171 |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
426 | 431 |
427 // Handles delayed showing of the overflow menu when hovering. | 432 // Handles delayed showing of the overflow menu when hovering. |
428 base::WeakPtrFactory<BrowserActionsContainer> show_menu_task_factory_; | 433 base::WeakPtrFactory<BrowserActionsContainer> show_menu_task_factory_; |
429 | 434 |
430 ObserverList<BrowserActionsContainerObserver> observers_; | 435 ObserverList<BrowserActionsContainerObserver> observers_; |
431 | 436 |
432 DISALLOW_COPY_AND_ASSIGN(BrowserActionsContainer); | 437 DISALLOW_COPY_AND_ASSIGN(BrowserActionsContainer); |
433 }; | 438 }; |
434 | 439 |
435 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_BROWSER_ACTIONS_CONTAINER_H_ | 440 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_BROWSER_ACTIONS_CONTAINER_H_ |
OLD | NEW |