Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6066)

Unified Diff: chrome/browser/ui/views/toolbar/browser_actions_container.h

Issue 602613003: Fix three small bugs in BrowserActionsContainer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/toolbar/browser_actions_container.h
diff --git a/chrome/browser/ui/views/toolbar/browser_actions_container.h b/chrome/browser/ui/views/toolbar/browser_actions_container.h
index 930053223b4cb61eabcba2d2ce16cc52bf8739dd..831490d6f8e27e63cb4256f6d1f593541dd3a2a1 100644
--- a/chrome/browser/ui/views/toolbar/browser_actions_container.h
+++ b/chrome/browser/ui/views/toolbar/browser_actions_container.h
@@ -307,10 +307,11 @@ class BrowserActionsContainer
// are displayed.
void SetChevronVisibility();
- // Given a number of |icons| and whether to |display_chevron|, returns the
- // amount of pixels needed to draw the entire container. For convenience,
- // callers can set |icons| to -1 to mean "all icons".
- int IconCountToWidth(int icons, bool display_chevron) const;
+ // Given a number of |icons|, returns the pixels needed to draw the entire
+ // container (including the chevron if the number of icons is not all the
+ // icons and we're not using the redesign). For convenience, callers can set
Peter Kasting 2014/10/02 21:49:56 These two edited comments appear to be the only re
Devlin 2014/10/02 22:11:06 Good point. Done.
+ // |icons| to -1 to mean "all icons".
+ int IconCountToWidth(int icons) const;
// Given a pixel width, returns the number of icons that fit. (This
// automatically determines whether a chevron will be needed and includes it
@@ -318,7 +319,8 @@ class BrowserActionsContainer
size_t WidthToIconCount(int pixels) const;
// Returns the absolute minimum size you can shrink the container down to and
- // still show it. This assumes a visible chevron because the only way we
+ // still show it. In the redesign, this leaves only enough room for the resize
+ // area; otherwise, this assumes a visible chevron because the only way we
// would not have a chevron when shrinking down this far is if there were no
// icons, in which case the container wouldn't be shown at all.
int MinimumNonemptyWidth() const;

Powered by Google App Engine
This is Rietveld 408576698