Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 1361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1372 int x = previous_tab_bounds.right() - tab_bounds.x() - | 1372 int x = previous_tab_bounds.right() - tab_bounds.x() - |
| 1373 kStackedTabRightClip; | 1373 kStackedTabRightClip; |
| 1374 clip->SetRect(x, 0, tab_bounds.width() - x, tab_bounds.height()); | 1374 clip->SetRect(x, 0, tab_bounds.width() - x, tab_bounds.height()); |
| 1375 } | 1375 } |
| 1376 } | 1376 } |
| 1377 return true; | 1377 return true; |
| 1378 } | 1378 } |
| 1379 | 1379 |
| 1380 bool TabStrip::CanPaintThrobberToLayer() const { | 1380 bool TabStrip::CanPaintThrobberToLayer() const { |
| 1381 // Disable layer-painting of throbbers if dragging, if any tab animation is in | 1381 // Disable layer-painting of throbbers if dragging, if any tab animation is in |
| 1382 // progress, or if stacked tabs are enabled. | 1382 // progress, or if stacked tabs are enabled. Also disable in fullscreen: when |
| 1383 // "immersive" the tab strip could be sliding in or out while transitioning to | |
| 1384 // or away from |immersive_style_| and, for other modes, there's no tab strip. | |
| 1383 const bool dragging = drag_controller_ && drag_controller_->started_drag(); | 1385 const bool dragging = drag_controller_ && drag_controller_->started_drag(); |
| 1384 return !touch_layout_ && !dragging && !IsAnimating(); | 1386 return !touch_layout_ && !dragging && !IsAnimating() && |
| 1387 !GetWidget()->IsFullscreen(); | |
|
sky
2016/03/03 20:31:01
Are you sure you don't need a null check for GetWi
tapted
2016/03/03 22:44:07
Added a null check - leaving it off certainly wasn
| |
| 1385 } | 1388 } |
| 1386 | 1389 |
| 1387 bool TabStrip::IsIncognito() const { | 1390 bool TabStrip::IsIncognito() const { |
| 1388 return controller()->IsIncognito(); | 1391 return controller()->IsIncognito(); |
| 1389 } | 1392 } |
| 1390 | 1393 |
| 1391 bool TabStrip::IsImmersiveStyle() const { | 1394 bool TabStrip::IsImmersiveStyle() const { |
| 1392 return immersive_style_; | 1395 return immersive_style_; |
| 1393 } | 1396 } |
| 1394 | 1397 |
| (...skipping 1478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2873 ConvertPointToViewAndGetEventHandler(this, newtab_button_, point); | 2876 ConvertPointToViewAndGetEventHandler(this, newtab_button_, point); |
| 2874 if (view) | 2877 if (view) |
| 2875 return view; | 2878 return view; |
| 2876 } | 2879 } |
| 2877 Tab* tab = FindTabForEvent(point); | 2880 Tab* tab = FindTabForEvent(point); |
| 2878 if (tab) | 2881 if (tab) |
| 2879 return ConvertPointToViewAndGetEventHandler(this, tab, point); | 2882 return ConvertPointToViewAndGetEventHandler(this, tab, point); |
| 2880 } | 2883 } |
| 2881 return this; | 2884 return this; |
| 2882 } | 2885 } |
| OLD | NEW |