diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-14 01:17:04 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-14 01:17:04 +0000 |
commit | 5da4928116a7168b456415f9af412f93138b6dcb (patch) | |
tree | 2a541f2fba8509c8646e02f60082faad09510cae /chrome/browser/views | |
parent | 3d871546f6c7585aa687500ae92fd410dbf32adc (diff) | |
download | chromium_src-5da4928116a7168b456415f9af412f93138b6dcb.zip chromium_src-5da4928116a7168b456415f9af412f93138b6dcb.tar.gz chromium_src-5da4928116a7168b456415f9af412f93138b6dcb.tar.bz2 |
cleanup: rename variable |resize_layout_scheduled_| to |needs_resize_layout_|.
BUG=None
TEST=None
Review URL: http://codereview.chromium.org/391042
Patch from tfarina.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31983 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views')
-rw-r--r-- | chrome/browser/views/tabs/tab_strip.cc | 12 | ||||
-rw-r--r-- | chrome/browser/views/tabs/tab_strip.h | 3 |
2 files changed, 7 insertions, 8 deletions
diff --git a/chrome/browser/views/tabs/tab_strip.cc b/chrome/browser/views/tabs/tab_strip.cc index 35328af..ef64c48 100644 --- a/chrome/browser/views/tabs/tab_strip.cc +++ b/chrome/browser/views/tabs/tab_strip.cc @@ -504,7 +504,7 @@ class TabStrip::ResizeLayoutAnimation : public TabStrip::TabAnimation { // Overridden from AnimationDelegate: virtual void AnimationEnded(const Animation* animation) { - tabstrip_->resize_layout_scheduled_ = false; + tabstrip_->needs_resize_layout_ = false; TabStrip::TabAnimation::AnimationEnded(animation); } @@ -645,7 +645,7 @@ class TabStrip::PinAndMoveAnimation : public TabStrip::TabAnimation { } virtual void AnimationEnded(const Animation* animation) { - tabstrip_->resize_layout_scheduled_ = false; + tabstrip_->needs_resize_layout_ = false; TabStrip::TabAnimation::AnimationEnded(animation); } @@ -714,7 +714,7 @@ TabStrip::TabStrip(TabStripModel* model) : model_(model), resize_layout_factory_(this), added_as_message_loop_observer_(false), - resize_layout_scheduled_(false), + needs_resize_layout_(false), current_unselected_width_(Tab::GetStandardSize().width()), current_selected_width_(Tab::GetStandardSize().width()), available_width_for_tabs_(-1) { @@ -1052,7 +1052,7 @@ void TabStrip::TabSelectedAt(TabContents* old_contents, // We have "tiny tabs" if the tabs are so tiny that the unselected ones are // a different size to the selected ones. bool tiny_tabs = current_unselected_width_ != current_selected_width_; - if (!IsAnimating() && (!resize_layout_scheduled_ || tiny_tabs)) { + if (!IsAnimating() && (!needs_resize_layout_ || tiny_tabs)) { Layout(); } else { SchedulePaint(); @@ -1126,7 +1126,7 @@ void TabStrip::CloseTab(Tab* tab) { // Tabs are not resized until a later time (when the mouse pointer leaves // the TabStrip). available_width_for_tabs_ = GetAvailableWidthForTabs(last_tab); - resize_layout_scheduled_ = true; + needs_resize_layout_ = true; AddMessageLoopObserver(); // Note that the next call might not close the tab (because of unload // hanlders or if the delegate veto the close). @@ -1800,7 +1800,7 @@ void TabStrip::GenerateIdealBounds() { void TabStrip::LayoutNewTabButton(double last_tab_right, double unselected_width) { int delta = abs(Round(unselected_width) - Tab::GetStandardSize().width()); - if (delta > 1 && !resize_layout_scheduled_) { + if (delta > 1 && !needs_resize_layout_) { // We're shrinking tabs, so we need to anchor the New Tab button to the // right edge of the TabStrip's bounds, rather than the right edge of the // right-most Tab, otherwise it'll bounce when animating. diff --git a/chrome/browser/views/tabs/tab_strip.h b/chrome/browser/views/tabs/tab_strip.h index 659d015..1a5b844 100644 --- a/chrome/browser/views/tabs/tab_strip.h +++ b/chrome/browser/views/tabs/tab_strip.h @@ -315,8 +315,7 @@ class TabStrip : public views::View, // True if a resize layout animation should be run a short delay after the // mouse exits the TabStrip. - // TODO(beng): (Cleanup) this would be better named "needs_resize_layout_". - bool resize_layout_scheduled_; + bool needs_resize_layout_; // The "New Tab" button. views::ImageButton* newtab_button_; |