Chromium Code Reviews| 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" |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 180 | 180 |
| 181 // Returns how many browser actions will be visible once the container | 181 // Returns how many browser actions will be visible once the container |
| 182 // finishes animating to a new size, or (if not animating) the currently | 182 // finishes animating to a new size, or (if not animating) the currently |
| 183 // visible icons. | 183 // visible icons. |
| 184 size_t VisibleBrowserActionsAfterAnimation() const; | 184 size_t VisibleBrowserActionsAfterAnimation() const; |
| 185 | 185 |
| 186 // Executes |command| registered by |extension|. | 186 // Executes |command| registered by |extension|. |
| 187 void ExecuteExtensionCommand(const extensions::Extension* extension, | 187 void ExecuteExtensionCommand(const extensions::Extension* extension, |
| 188 const extensions::Command& command); | 188 const extensions::Command& command); |
| 189 | 189 |
| 190 // Returns if the given |accelerator| is registered by an extension. | |
|
Finnur
2014/09/10 10:15:16
nit: s/if/whether/
David Tseng
2014/09/10 21:19:07
Done.
| |
| 191 bool IsExtensionCommandRegistered(const ui::Accelerator& accelerator); | |
| 192 | |
| 190 // Add or remove an observer. | 193 // Add or remove an observer. |
| 191 void AddObserver(BrowserActionsContainerObserver* observer); | 194 void AddObserver(BrowserActionsContainerObserver* observer); |
| 192 void RemoveObserver(BrowserActionsContainerObserver* observer); | 195 void RemoveObserver(BrowserActionsContainerObserver* observer); |
| 193 | 196 |
| 194 // Overridden from views::View: | 197 // Overridden from views::View: |
| 195 virtual gfx::Size GetPreferredSize() const OVERRIDE; | 198 virtual gfx::Size GetPreferredSize() const OVERRIDE; |
| 196 virtual gfx::Size GetMinimumSize() const OVERRIDE; | 199 virtual gfx::Size GetMinimumSize() const OVERRIDE; |
| 197 virtual void Layout() OVERRIDE; | 200 virtual void Layout() OVERRIDE; |
| 198 virtual bool GetDropFormats(int* formats, | 201 virtual bool GetDropFormats(int* formats, |
| 199 std::set<ui::OSExchangeData::CustomFormat>* custom_formats) OVERRIDE; | 202 std::set<ui::OSExchangeData::CustomFormat>* custom_formats) OVERRIDE; |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 417 | 420 |
| 418 // Handles delayed showing of the overflow menu when hovering. | 421 // Handles delayed showing of the overflow menu when hovering. |
| 419 base::WeakPtrFactory<BrowserActionsContainer> show_menu_task_factory_; | 422 base::WeakPtrFactory<BrowserActionsContainer> show_menu_task_factory_; |
| 420 | 423 |
| 421 ObserverList<BrowserActionsContainerObserver> observers_; | 424 ObserverList<BrowserActionsContainerObserver> observers_; |
| 422 | 425 |
| 423 DISALLOW_COPY_AND_ASSIGN(BrowserActionsContainer); | 426 DISALLOW_COPY_AND_ASSIGN(BrowserActionsContainer); |
| 424 }; | 427 }; |
| 425 | 428 |
| 426 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_BROWSER_ACTIONS_CONTAINER_H_ | 429 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_BROWSER_ACTIONS_CONTAINER_H_ |
| OLD | NEW |