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

Side by Side Diff: chrome/browser/ui/touch/tabs/touch_tab_strip.cc

Issue 6529037: Rename ProcessPaint to Paint() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 10 months 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/touch/tabs/touch_tab_strip.h" 5 #include "chrome/browser/ui/touch/tabs/touch_tab_strip.h"
6 6
7 #include "chrome/browser/ui/touch/tabs/touch_tab.h" 7 #include "chrome/browser/ui/touch/tabs/touch_tab.h"
8 #include "chrome/browser/ui/view_ids.h" 8 #include "chrome/browser/ui/view_ids.h"
9 #include "ui/gfx/canvas_skia.h" 9 #include "ui/gfx/canvas_skia.h"
10 #include "views/window/non_client_view.h" 10 #include "views/window/non_client_view.h"
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 TouchTab* dragging_tab = NULL; 150 TouchTab* dragging_tab = NULL;
151 151
152 for (int i = tab_count() - 1; i >= 0; --i) { 152 for (int i = tab_count() - 1; i >= 0; --i) {
153 TouchTab* tab = GetTabAtTabDataIndex(i); 153 TouchTab* tab = GetTabAtTabDataIndex(i);
154 // We must ask the _Tab's_ model, not ourselves, because in some situations 154 // We must ask the _Tab's_ model, not ourselves, because in some situations
155 // the model will be different to this object, e.g. when a Tab is being 155 // the model will be different to this object, e.g. when a Tab is being
156 // removed after its TabContents has been destroyed. 156 // removed after its TabContents has been destroyed.
157 if (tab->dragging()) { 157 if (tab->dragging()) {
158 dragging_tab = tab; 158 dragging_tab = tab;
159 } else if (!tab->IsSelected()) { 159 } else if (!tab->IsSelected()) {
160 tab->ProcessPaint(canvas); 160 tab->Paint(canvas);
161 } else { 161 } else {
162 selected_tab = tab; 162 selected_tab = tab;
163 } 163 }
164 } 164 }
165 165
166 if (GetWindow()->GetNonClientView()->UseNativeFrame()) { 166 if (GetWindow()->GetNonClientView()->UseNativeFrame()) {
167 // Make sure unselected tabs are somewhat transparent. 167 // Make sure unselected tabs are somewhat transparent.
168 SkPaint paint; 168 SkPaint paint;
169 paint.setColor(SkColorSetARGB(200, 255, 255, 255)); 169 paint.setColor(SkColorSetARGB(200, 255, 255, 255));
170 paint.setXfermodeMode(SkXfermode::kDstIn_Mode); 170 paint.setXfermodeMode(SkXfermode::kDstIn_Mode);
171 paint.setStyle(SkPaint::kFill_Style); 171 paint.setStyle(SkPaint::kFill_Style);
172 canvas->DrawRectInt(0, 0, width(), 172 canvas->DrawRectInt(0, 0, width(),
173 height() - 2, // Visible region that overlaps the toolbar. 173 height() - 2, // Visible region that overlaps the toolbar.
174 paint); 174 paint);
175 } 175 }
176 176
177 // Paint the selected tab last, so it overlaps all the others. 177 // Paint the selected tab last, so it overlaps all the others.
178 if (selected_tab) 178 if (selected_tab)
179 selected_tab->ProcessPaint(canvas); 179 selected_tab->Paint(canvas);
180 180
181 // And the dragged tab. 181 // And the dragged tab.
182 if (dragging_tab) 182 if (dragging_tab)
183 dragging_tab->ProcessPaint(canvas); 183 dragging_tab->Paint(canvas);
184 } 184 }
185 185
186 TouchTab* TouchTabStrip::GetTabAtTabDataIndex(int tab_data_index) const { 186 TouchTab* TouchTabStrip::GetTabAtTabDataIndex(int tab_data_index) const {
187 return static_cast<TouchTab*>(base_tab_at_tab_index(tab_data_index)); 187 return static_cast<TouchTab*>(base_tab_at_tab_index(tab_data_index));
188 } 188 }
189 189
190 //////////////////////////////////////////////////////////////////////////////// 190 ////////////////////////////////////////////////////////////////////////////////
191 // TouchTabStrip, private: 191 // TouchTabStrip, private:
192 192
193 void TouchTabStrip::Init() { 193 void TouchTabStrip::Init() {
194 SetID(VIEW_ID_TAB_STRIP); 194 SetID(VIEW_ID_TAB_STRIP);
195 } 195 }
196 196
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/rounded_view.h ('k') | chrome/browser/ui/views/tab_contents/tab_contents_view_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698