| 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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| 161 // Get a particular browser action view. | 166 // Get a particular browser action view. |
| 162 BrowserActionView* GetBrowserActionViewAt(int index) { | 167 BrowserActionView* GetBrowserActionViewAt(int index) { |
| 163 return browser_action_views_[index]; | 168 return browser_action_views_[index]; |
| 164 } | 169 } |
| 165 | 170 |
| 166 // Returns the BrowserActionView* associated with the given |extension|, or | 171 // Returns the BrowserActionView* associated with the given |extension|, or |
| 167 // NULL if none exists. | 172 // NULL if none exists. |
| 168 BrowserActionView* GetViewForExtension( | 173 BrowserActionView* GetViewForExtension( |
| 169 const extensions::Extension* extension); | 174 const extensions::Extension* extension); |
| 170 | 175 |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 430 ObserverList<BrowserActionsContainerObserver> observers_; | 435 ObserverList<BrowserActionsContainerObserver> observers_; |
| 431 | 436 |
| 432 // The maximum number of icons to show per row when in overflow mode (showing | 437 // The maximum number of icons to show per row when in overflow mode (showing |
| 433 // icons in the application menu). | 438 // icons in the application menu). |
| 434 static int icons_per_overflow_menu_row_; | 439 static int icons_per_overflow_menu_row_; |
| 435 | 440 |
| 436 DISALLOW_COPY_AND_ASSIGN(BrowserActionsContainer); | 441 DISALLOW_COPY_AND_ASSIGN(BrowserActionsContainer); |
| 437 }; | 442 }; |
| 438 | 443 |
| 439 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_BROWSER_ACTIONS_CONTAINER_H_ | 444 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_BROWSER_ACTIONS_CONTAINER_H_ |
| OLD | NEW |