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

Unified Diff: chrome/browser/ui/views/tabs/tab_strip.cc

Issue 1393193002: Paint tab-loading throbbers into a ui::Layer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: overrides -> private Created 5 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/tabs/tab_strip.cc
diff --git a/chrome/browser/ui/views/tabs/tab_strip.cc b/chrome/browser/ui/views/tabs/tab_strip.cc
index b8010e22fdfd63b041efbfb844080be0012bb44f..fa535813936726c33c06a2314e9f990aec39a961 100644
--- a/chrome/browser/ui/views/tabs/tab_strip.cc
+++ b/chrome/browser/ui/views/tabs/tab_strip.cc
@@ -1176,16 +1176,17 @@ void TabStrip::OnMouseEventInTab(views::View* source,
}
bool TabStrip::ShouldPaintTab(const Tab* tab, gfx::Rect* clip) {
+ const bool dragging = drag_controller_ && drag_controller_->started_drag();
// Only touch layout needs to restrict the clip.
- if (!touch_layout_ && !IsStackingDraggedTabs())
+ if (!touch_layout_ && !dragging)
return true;
int index = GetModelIndexOfTab(tab);
if (index == -1)
return true; // Tab is closing, paint it all.
- int active_index = IsStackingDraggedTabs() ?
- controller_->GetActiveIndex() : touch_layout_->active_index();
+ int active_index =
+ dragging ? controller_->GetActiveIndex() : touch_layout_->active_index();
if (active_index == tab_count())
active_index--;
@@ -1751,12 +1752,6 @@ void TabStrip::StackDraggedTabs(int delta) {
SchedulePaint();
}
-bool TabStrip::IsStackingDraggedTabs() const {
- return drag_controller_.get() && drag_controller_->started_drag() &&
- (drag_controller_->move_behavior() ==
- TabDragController::MOVE_VISIBILE_TABS);
-}
-
void TabStrip::LayoutDraggedTabsAt(const Tabs& tabs,
Tab* active_tab,
const gfx::Point& location,
« chrome/browser/ui/views/tabs/tab.cc ('K') | « chrome/browser/ui/views/tabs/tab_strip.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698