Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(153)

Side by Side Diff: chrome/browser/ui/views/tabs/tab_strip.cc

Issue 1423653005: Further plumb visual rect into cc:DisplayItemList. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix cc unit tests. Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 1232 matching lines...) Expand 10 before | Expand all | Expand 10 after
1243 Tab* active_tab = NULL; 1243 Tab* active_tab = NULL;
1244 Tabs tabs_dragging; 1244 Tabs tabs_dragging;
1245 Tabs selected_tabs; 1245 Tabs selected_tabs;
1246 1246
1247 { 1247 {
1248 const chrome::HostDesktopType host_desktop_type = 1248 const chrome::HostDesktopType host_desktop_type =
1249 chrome::GetHostDesktopTypeForNativeView(GetWidget()->GetNativeView()); 1249 chrome::GetHostDesktopTypeForNativeView(GetWidget()->GetNativeView());
1250 const uint8_t inactive_tab_alpha = 1250 const uint8_t inactive_tab_alpha =
1251 (host_desktop_type == chrome::HOST_DESKTOP_TYPE_ASH) ? 1251 (host_desktop_type == chrome::HOST_DESKTOP_TYPE_ASH) ?
1252 GetInactiveAlpha(false) : 255; 1252 GetInactiveAlpha(false) : 255;
1253 ui::CompositingRecorder opacity_recorder(context, inactive_tab_alpha); 1253 ui::CompositingRecorder opacity_recorder(context, size(),
1254 inactive_tab_alpha);
1254 1255
1255 PaintClosingTabs(tab_count(), context); 1256 PaintClosingTabs(tab_count(), context);
1256 1257
1257 int active_tab_index = -1; 1258 int active_tab_index = -1;
1258 for (int i = tab_count() - 1; i >= 0; --i) { 1259 for (int i = tab_count() - 1; i >= 0; --i) {
1259 Tab* tab = tab_at(i); 1260 Tab* tab = tab_at(i);
1260 if (tab->dragging() && !stacked_layout_) { 1261 if (tab->dragging() && !stacked_layout_) {
1261 is_dragging = true; 1262 is_dragging = true;
1262 if (tab->IsActive()) { 1263 if (tab->IsActive()) {
1263 active_tab = tab; 1264 active_tab = tab;
(...skipping 1398 matching lines...) Expand 10 before | Expand all | Expand 10 after
2662 ConvertPointToViewAndGetEventHandler(this, newtab_button_, point); 2663 ConvertPointToViewAndGetEventHandler(this, newtab_button_, point);
2663 if (view) 2664 if (view)
2664 return view; 2665 return view;
2665 } 2666 }
2666 Tab* tab = FindTabForEvent(point); 2667 Tab* tab = FindTabForEvent(point);
2667 if (tab) 2668 if (tab)
2668 return ConvertPointToViewAndGetEventHandler(this, tab, point); 2669 return ConvertPointToViewAndGetEventHandler(this, tab, point);
2669 } 2670 }
2670 return this; 2671 return this;
2671 } 2672 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698