| 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 const views::Widget* widget = GetWidget(); |
| 1387 return widget && !touch_layout_ && !dragging && !IsAnimating() && |
| 1388 !widget->IsFullscreen(); |
| 1385 } | 1389 } |
| 1386 | 1390 |
| 1387 bool TabStrip::IsIncognito() const { | 1391 bool TabStrip::IsIncognito() const { |
| 1388 return controller()->IsIncognito(); | 1392 return controller()->IsIncognito(); |
| 1389 } | 1393 } |
| 1390 | 1394 |
| 1391 bool TabStrip::IsImmersiveStyle() const { | 1395 bool TabStrip::IsImmersiveStyle() const { |
| 1392 return immersive_style_; | 1396 return immersive_style_; |
| 1393 } | 1397 } |
| 1394 | 1398 |
| (...skipping 1478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2873 ConvertPointToViewAndGetEventHandler(this, newtab_button_, point); | 2877 ConvertPointToViewAndGetEventHandler(this, newtab_button_, point); |
| 2874 if (view) | 2878 if (view) |
| 2875 return view; | 2879 return view; |
| 2876 } | 2880 } |
| 2877 Tab* tab = FindTabForEvent(point); | 2881 Tab* tab = FindTabForEvent(point); |
| 2878 if (tab) | 2882 if (tab) |
| 2879 return ConvertPointToViewAndGetEventHandler(this, tab, point); | 2883 return ConvertPointToViewAndGetEventHandler(this, tab, point); |
| 2880 } | 2884 } |
| 2881 return this; | 2885 return this; |
| 2882 } | 2886 } |
| OLD | NEW |