| 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 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 342 | 342 |
| 343 // Animate to the target size (unless testing, in which case we go straight to | 343 // Animate to the target size (unless testing, in which case we go straight to |
| 344 // the target size). | 344 // the target size). |
| 345 void Animate(gfx::Tween::Type type, size_t num_visible_icons); | 345 void Animate(gfx::Tween::Type type, size_t num_visible_icons); |
| 346 | 346 |
| 347 // Returns true if this extension should be shown in this toolbar. This can | 347 // Returns true if this extension should be shown in this toolbar. This can |
| 348 // return false if we are in an incognito window and the extension is disabled | 348 // return false if we are in an incognito window and the extension is disabled |
| 349 // for incognito. | 349 // for incognito. |
| 350 bool ShouldDisplayBrowserAction(const extensions::Extension* extension) const; | 350 bool ShouldDisplayBrowserAction(const extensions::Extension* extension) const; |
| 351 | 351 |
| 352 // Return the index of the first visible icon. | |
| 353 size_t GetFirstVisibleIconIndex() const; | |
| 354 | |
| 355 // Returns the number of icons that this container should draw. This differs | 352 // Returns the number of icons that this container should draw. This differs |
| 356 // from the model's GetVisibleIconCount if this container is for the overflow. | 353 // from the model's GetVisibleIconCount if this container is for the overflow. |
| 357 size_t GetIconCount() const; | 354 size_t GetIconCount() const; |
| 358 | 355 |
| 359 // Whether this container is in overflow mode (as opposed to in 'main' | 356 // Whether this container is in overflow mode (as opposed to in 'main' |
| 360 // mode). See class comments for details on the difference. | 357 // mode). See class comments for details on the difference. |
| 361 bool in_overflow_mode() const { return main_container_ != NULL; } | 358 bool in_overflow_mode() const { return main_container_ != NULL; } |
| 362 | 359 |
| 363 // Whether or not the container has been initialized. | 360 // Whether or not the container has been initialized. |
| 364 bool initialized_; | 361 bool initialized_; |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 433 ObserverList<BrowserActionsContainerObserver> observers_; | 430 ObserverList<BrowserActionsContainerObserver> observers_; |
| 434 | 431 |
| 435 // The maximum number of icons to show per row when in overflow mode (showing | 432 // The maximum number of icons to show per row when in overflow mode (showing |
| 436 // icons in the application menu). | 433 // icons in the application menu). |
| 437 static int icons_per_overflow_menu_row_; | 434 static int icons_per_overflow_menu_row_; |
| 438 | 435 |
| 439 DISALLOW_COPY_AND_ASSIGN(BrowserActionsContainer); | 436 DISALLOW_COPY_AND_ASSIGN(BrowserActionsContainer); |
| 440 }; | 437 }; |
| 441 | 438 |
| 442 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_BROWSER_ACTIONS_CONTAINER_H_ | 439 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_BROWSER_ACTIONS_CONTAINER_H_ |
| OLD | NEW |