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 1251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1262 Tab* active_tab = NULL; | 1262 Tab* active_tab = NULL; |
1263 Tabs tabs_dragging; | 1263 Tabs tabs_dragging; |
1264 Tabs selected_tabs; | 1264 Tabs selected_tabs; |
1265 | 1265 |
1266 { | 1266 { |
1267 const chrome::HostDesktopType host_desktop_type = | 1267 const chrome::HostDesktopType host_desktop_type = |
1268 chrome::GetHostDesktopTypeForNativeView(GetWidget()->GetNativeView()); | 1268 chrome::GetHostDesktopTypeForNativeView(GetWidget()->GetNativeView()); |
1269 const uint8_t inactive_tab_alpha = | 1269 const uint8_t inactive_tab_alpha = |
1270 (host_desktop_type == chrome::HOST_DESKTOP_TYPE_ASH) ? | 1270 (host_desktop_type == chrome::HOST_DESKTOP_TYPE_ASH) ? |
1271 GetInactiveAlpha(false) : 255; | 1271 GetInactiveAlpha(false) : 255; |
1272 ui::CompositingRecorder opacity_recorder(context, inactive_tab_alpha); | 1272 ui::CompositingRecorder opacity_recorder(context, size(), |
| 1273 inactive_tab_alpha); |
1273 | 1274 |
1274 PaintClosingTabs(tab_count(), context); | 1275 PaintClosingTabs(tab_count(), context); |
1275 | 1276 |
1276 int active_tab_index = -1; | 1277 int active_tab_index = -1; |
1277 for (int i = tab_count() - 1; i >= 0; --i) { | 1278 for (int i = tab_count() - 1; i >= 0; --i) { |
1278 Tab* tab = tab_at(i); | 1279 Tab* tab = tab_at(i); |
1279 if (tab->dragging() && !stacked_layout_) { | 1280 if (tab->dragging() && !stacked_layout_) { |
1280 is_dragging = true; | 1281 is_dragging = true; |
1281 if (tab->IsActive()) { | 1282 if (tab->IsActive()) { |
1282 active_tab = tab; | 1283 active_tab = tab; |
(...skipping 1398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2681 ConvertPointToViewAndGetEventHandler(this, newtab_button_, point); | 2682 ConvertPointToViewAndGetEventHandler(this, newtab_button_, point); |
2682 if (view) | 2683 if (view) |
2683 return view; | 2684 return view; |
2684 } | 2685 } |
2685 Tab* tab = FindTabForEvent(point); | 2686 Tab* tab = FindTabForEvent(point); |
2686 if (tab) | 2687 if (tab) |
2687 return ConvertPointToViewAndGetEventHandler(this, tab, point); | 2688 return ConvertPointToViewAndGetEventHandler(this, tab, point); |
2688 } | 2689 } |
2689 return this; | 2690 return this; |
2690 } | 2691 } |
OLD | NEW |