OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_BROWSER_ACTIONS_CONTAINER_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_BROWSER_ACTIONS_CONTAINER_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_BROWSER_ACTIONS_CONTAINER_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_BROWSER_ACTIONS_CONTAINER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
436 size_t WidthToIconCount(int pixels) const; | 436 size_t WidthToIconCount(int pixels) const; |
437 | 437 |
438 // Returns the absolute minimum size you can shrink the container down to and | 438 // Returns the absolute minimum size you can shrink the container down to and |
439 // still show it. This assumes a visible chevron because the only way we | 439 // still show it. This assumes a visible chevron because the only way we |
440 // would not have a chevron when shrinking down this far is if there were no | 440 // would not have a chevron when shrinking down this far is if there were no |
441 // icons, in which case the container wouldn't be shown at all. | 441 // icons, in which case the container wouldn't be shown at all. |
442 int ContainerMinSize() const; | 442 int ContainerMinSize() const; |
443 | 443 |
444 // Animate to the target size (unless testing, in which case we go straight to | 444 // Animate to the target size (unless testing, in which case we go straight to |
445 // the target size). This also saves the target number of visible icons in | 445 // the target size). This also saves the target number of visible icons in |
446 // the pref if we're not off the record. | 446 // the pref if we're not incognito. |
447 void SaveDesiredSizeAndAnimate(ui::Tween::Type type, | 447 void SaveDesiredSizeAndAnimate(ui::Tween::Type type, |
448 size_t num_visible_icons); | 448 size_t num_visible_icons); |
449 | 449 |
450 // Returns true if this extension should be shown in this toolbar. This can | 450 // Returns true if this extension should be shown in this toolbar. This can |
451 // return false if we are in an incognito window and the extension is disabled | 451 // return false if we are in an incognito window and the extension is disabled |
452 // for incognito. | 452 // for incognito. |
453 bool ShouldDisplayBrowserAction(const Extension* extension); | 453 bool ShouldDisplayBrowserAction(const Extension* extension); |
454 | 454 |
455 // The vector of browser actions (icons/image buttons for each action). Note | 455 // The vector of browser actions (icons/image buttons for each action). Note |
456 // that not every BrowserAction in the ToolbarModel will necessarily be in | 456 // that not every BrowserAction in the ToolbarModel will necessarily be in |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
508 | 508 |
509 ScopedRunnableMethodFactory<BrowserActionsContainer> task_factory_; | 509 ScopedRunnableMethodFactory<BrowserActionsContainer> task_factory_; |
510 | 510 |
511 // Handles delayed showing of the overflow menu when hovering. | 511 // Handles delayed showing of the overflow menu when hovering. |
512 ScopedRunnableMethodFactory<BrowserActionsContainer> show_menu_task_factory_; | 512 ScopedRunnableMethodFactory<BrowserActionsContainer> show_menu_task_factory_; |
513 | 513 |
514 DISALLOW_COPY_AND_ASSIGN(BrowserActionsContainer); | 514 DISALLOW_COPY_AND_ASSIGN(BrowserActionsContainer); |
515 }; | 515 }; |
516 | 516 |
517 #endif // CHROME_BROWSER_UI_VIEWS_BROWSER_ACTIONS_CONTAINER_H_ | 517 #endif // CHROME_BROWSER_UI_VIEWS_BROWSER_ACTIONS_CONTAINER_H_ |
OLD | NEW |