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 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 #include <windowsx.h> | 8 #include <windowsx.h> |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 1247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1258 // The view order doesn't match the paint order (tabs_ contains the tab | 1258 // The view order doesn't match the paint order (tabs_ contains the tab |
1259 // ordering). Additionally we need to paint the tabs that are closing in | 1259 // ordering). Additionally we need to paint the tabs that are closing in |
1260 // |tabs_closing_map_|. | 1260 // |tabs_closing_map_|. |
1261 Tab* active_tab = NULL; | 1261 Tab* active_tab = NULL; |
1262 Tabs tabs_dragging; | 1262 Tabs tabs_dragging; |
1263 Tabs selected_tabs; | 1263 Tabs selected_tabs; |
1264 int selected_tab_count = 0; | 1264 int selected_tab_count = 0; |
1265 bool is_dragging = false; | 1265 bool is_dragging = false; |
1266 int active_tab_index = -1; | 1266 int active_tab_index = -1; |
1267 | 1267 |
1268 const chrome::HostDesktopType host_desktop_type = | 1268 const ui::HostDesktopType host_desktop_type = |
1269 chrome::GetHostDesktopTypeForNativeView(GetWidget()->GetNativeView()); | 1269 chrome::GetHostDesktopTypeForNativeView(GetWidget()->GetNativeView()); |
1270 const uint8_t inactive_tab_alpha = | 1270 const uint8_t inactive_tab_alpha = |
1271 (host_desktop_type == chrome::HOST_DESKTOP_TYPE_ASH) | 1271 (host_desktop_type == ui::HOST_DESKTOP_TYPE_ASH) |
1272 ? kInactiveTabAndNewTabButtonAlphaAsh | 1272 ? kInactiveTabAndNewTabButtonAlphaAsh |
1273 : kInactiveTabAndNewTabButtonAlpha; | 1273 : kInactiveTabAndNewTabButtonAlpha; |
1274 | 1274 |
1275 { | 1275 { |
1276 ui::CompositingRecorder opacity_recorder(context, inactive_tab_alpha); | 1276 ui::CompositingRecorder opacity_recorder(context, inactive_tab_alpha); |
1277 | 1277 |
1278 PaintClosingTabs(tab_count(), context); | 1278 PaintClosingTabs(tab_count(), context); |
1279 | 1279 |
1280 for (int i = tab_count() - 1; i >= 0; --i) { | 1280 for (int i = tab_count() - 1; i >= 0; --i) { |
1281 Tab* tab = tab_at(i); | 1281 Tab* tab = tab_at(i); |
(...skipping 1497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2779 ConvertPointToViewAndGetEventHandler(this, newtab_button_, point); | 2779 ConvertPointToViewAndGetEventHandler(this, newtab_button_, point); |
2780 if (view) | 2780 if (view) |
2781 return view; | 2781 return view; |
2782 } | 2782 } |
2783 Tab* tab = FindTabForEvent(point); | 2783 Tab* tab = FindTabForEvent(point); |
2784 if (tab) | 2784 if (tab) |
2785 return ConvertPointToViewAndGetEventHandler(this, tab, point); | 2785 return ConvertPointToViewAndGetEventHandler(this, tab, point); |
2786 } | 2786 } |
2787 return this; | 2787 return this; |
2788 } | 2788 } |
OLD | NEW |