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 <algorithm> | 7 #include <algorithm> |
8 #include <iterator> | 8 #include <iterator> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 1202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1213 if (previous_tab_bounds.right() - GetLayoutConstant(TABSTRIP_TAB_OVERLAP) != | 1213 if (previous_tab_bounds.right() - GetLayoutConstant(TABSTRIP_TAB_OVERLAP) != |
1214 tab_bounds.x()) { | 1214 tab_bounds.x()) { |
1215 int x = previous_tab_bounds.right() - tab_bounds.x() - | 1215 int x = previous_tab_bounds.right() - tab_bounds.x() - |
1216 kStackedTabRightClip; | 1216 kStackedTabRightClip; |
1217 clip->SetRect(x, 0, tab_bounds.width() - x, tab_bounds.height()); | 1217 clip->SetRect(x, 0, tab_bounds.width() - x, tab_bounds.height()); |
1218 } | 1218 } |
1219 } | 1219 } |
1220 return true; | 1220 return true; |
1221 } | 1221 } |
1222 | 1222 |
| 1223 bool TabStrip::CanPaintThrobberToLayer() const { |
| 1224 // Disable layer-painting of throbbers if dragging, if any tab animation is in |
| 1225 // progress, or if stacked tabs are enabled. |
| 1226 const bool dragging = drag_controller_ && drag_controller_->started_drag(); |
| 1227 return !touch_layout_ && !dragging && !IsAnimating(); |
| 1228 } |
| 1229 |
1223 bool TabStrip::IsImmersiveStyle() const { | 1230 bool TabStrip::IsImmersiveStyle() const { |
1224 return immersive_style_; | 1231 return immersive_style_; |
1225 } | 1232 } |
1226 | 1233 |
1227 void TabStrip::UpdateTabAccessibilityState(const Tab* tab, | 1234 void TabStrip::UpdateTabAccessibilityState(const Tab* tab, |
1228 ui::AXViewState* state) { | 1235 ui::AXViewState* state) { |
1229 state->count = tab_count(); | 1236 state->count = tab_count(); |
1230 state->index = GetModelIndexOfTab(tab); | 1237 state->index = GetModelIndexOfTab(tab); |
1231 } | 1238 } |
1232 | 1239 |
(...skipping 1455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2688 ConvertPointToViewAndGetEventHandler(this, newtab_button_, point); | 2695 ConvertPointToViewAndGetEventHandler(this, newtab_button_, point); |
2689 if (view) | 2696 if (view) |
2690 return view; | 2697 return view; |
2691 } | 2698 } |
2692 Tab* tab = FindTabForEvent(point); | 2699 Tab* tab = FindTabForEvent(point); |
2693 if (tab) | 2700 if (tab) |
2694 return ConvertPointToViewAndGetEventHandler(this, tab, point); | 2701 return ConvertPointToViewAndGetEventHandler(this, tab, point); |
2695 } | 2702 } |
2696 return this; | 2703 return this; |
2697 } | 2704 } |
OLD | NEW |