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 | |
1230 bool TabStrip::IsImmersiveStyle() const { | 1223 bool TabStrip::IsImmersiveStyle() const { |
1231 return immersive_style_; | 1224 return immersive_style_; |
1232 } | 1225 } |
1233 | 1226 |
1234 void TabStrip::UpdateTabAccessibilityState(const Tab* tab, | 1227 void TabStrip::UpdateTabAccessibilityState(const Tab* tab, |
1235 ui::AXViewState* state) { | 1228 ui::AXViewState* state) { |
1236 state->count = tab_count(); | 1229 state->count = tab_count(); |
1237 state->index = GetModelIndexOfTab(tab); | 1230 state->index = GetModelIndexOfTab(tab); |
1238 } | 1231 } |
1239 | 1232 |
(...skipping 1455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2695 ConvertPointToViewAndGetEventHandler(this, newtab_button_, point); | 2688 ConvertPointToViewAndGetEventHandler(this, newtab_button_, point); |
2696 if (view) | 2689 if (view) |
2697 return view; | 2690 return view; |
2698 } | 2691 } |
2699 Tab* tab = FindTabForEvent(point); | 2692 Tab* tab = FindTabForEvent(point); |
2700 if (tab) | 2693 if (tab) |
2701 return ConvertPointToViewAndGetEventHandler(this, tab, point); | 2694 return ConvertPointToViewAndGetEventHandler(this, tab, point); |
2702 } | 2695 } |
2703 return this; | 2696 return this; |
2704 } | 2697 } |
OLD | NEW |