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

Side by Side Diff: chrome/browser/ui/views/tabs/tab_strip.cc

Issue 1775933004: [merge-m49] CrOS: Don't paint tab-loading spinners in layers while in immersive fullscreen. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2623
Patch Set: Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/ui/views/tabs/tab.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "chrome/browser/ui/views/tabs/tab_strip.h" 5 #include "chrome/browser/ui/views/tabs/tab_strip.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <iterator> 10 #include <iterator>
(...skipping 1354 matching lines...) Expand 10 before | Expand all | Expand 10 after
1365 int x = previous_tab_bounds.right() - tab_bounds.x() - 1365 int x = previous_tab_bounds.right() - tab_bounds.x() -
1366 kStackedTabRightClip; 1366 kStackedTabRightClip;
1367 clip->SetRect(x, 0, tab_bounds.width() - x, tab_bounds.height()); 1367 clip->SetRect(x, 0, tab_bounds.width() - x, tab_bounds.height());
1368 } 1368 }
1369 } 1369 }
1370 return true; 1370 return true;
1371 } 1371 }
1372 1372
1373 bool TabStrip::CanPaintThrobberToLayer() const { 1373 bool TabStrip::CanPaintThrobberToLayer() const {
1374 // Disable layer-painting of throbbers if dragging, if any tab animation is in 1374 // Disable layer-painting of throbbers if dragging, if any tab animation is in
1375 // progress, or if stacked tabs are enabled. 1375 // progress, or if stacked tabs are enabled. Also disable in fullscreen: when
1376 // "immersive" the tab strip could be sliding in or out while transitioning to
1377 // or away from |immersive_style_| and, for other modes, there's no tab strip.
1376 const bool dragging = drag_controller_ && drag_controller_->started_drag(); 1378 const bool dragging = drag_controller_ && drag_controller_->started_drag();
1377 return !touch_layout_ && !dragging && !IsAnimating(); 1379 const views::Widget* widget = GetWidget();
1380 return widget && !touch_layout_ && !dragging && !IsAnimating() &&
1381 !widget->IsFullscreen();
1378 } 1382 }
1379 1383
1380 bool TabStrip::IsImmersiveStyle() const { 1384 bool TabStrip::IsImmersiveStyle() const {
1381 return immersive_style_; 1385 return immersive_style_;
1382 } 1386 }
1383 1387
1384 int TabStrip::GetBackgroundResourceId(bool* custom_image) const { 1388 int TabStrip::GetBackgroundResourceId(bool* custom_image) const {
1385 const ui::ThemeProvider* theme_provider = GetThemeProvider(); 1389 const ui::ThemeProvider* theme_provider = GetThemeProvider();
1386 1390
1387 if (GetWidget()->ShouldWindowContentsBeTransparent()) { 1391 if (GetWidget()->ShouldWindowContentsBeTransparent()) {
(...skipping 1478 matching lines...) Expand 10 before | Expand all | Expand 10 after
2866 ConvertPointToViewAndGetEventHandler(this, newtab_button_, point); 2870 ConvertPointToViewAndGetEventHandler(this, newtab_button_, point);
2867 if (view) 2871 if (view)
2868 return view; 2872 return view;
2869 } 2873 }
2870 Tab* tab = FindTabForEvent(point); 2874 Tab* tab = FindTabForEvent(point);
2871 if (tab) 2875 if (tab)
2872 return ConvertPointToViewAndGetEventHandler(this, tab, point); 2876 return ConvertPointToViewAndGetEventHandler(this, tab, point);
2873 } 2877 }
2874 return this; 2878 return this;
2875 } 2879 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/tabs/tab.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698