Various minor tab code cleanups, mostly around pinned tabs.
commitca935e921b7faf4b4c1c24ee6268c1080c422d6a
authorpkasting <pkasting@chromium.org>
Fri, 11 Sep 2015 07:08:52 +0000 (11 00:08 -0700)
committerCommit bot <commit-bot@chromium.org>
Fri, 11 Sep 2015 07:09:17 +0000 (11 07:09 +0000)
tree7fb97026fff10e32d525aebbb07dd3da774a6bae
parentbb879e2eab62dc9b22af4f06f636c220f3466044
Various minor tab code cleanups, mostly around pinned tabs.

* Constants don't need to be both inside an anonymous namespace _and_ static.
* Change the pinned tab width constant from a whole-tab-width value to a width
  of just the interior content (between the left and right edges).  This makes
  it easier to figure out how to update the pinned tab width if the edge asset
  sizes change (as they will in Material Design) and is closer to how we size
  normal tabs.
* Change constant for how big a pinned tab needs to be to render as normal from
  an absolute size to a relative one.  This makes the code using this a little
  simpler.
* Add a helper function for whether a tab should be rendered as pinned, since
  several places were doing the same thing.
* There's no reason to have both GetBasicMinimumUnselectedSize() and
  GetMinimumUnselectedSize().  Condense to just the latter.
* Simplify various functions.

BUG=none
TEST=none

Review URL: https://codereview.chromium.org/1331803002

Cr-Commit-Position: refs/heads/master@{#348351}
chrome/browser/ui/views/tabs/tab.cc
chrome/browser/ui/views/tabs/tab.h