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

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

Issue 9021046: Pass const gfx::Rect& as the first parameter to FillRect. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: one more fix Created 8 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) 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 <vector> 9 #include <vector>
10 10
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 239
240 if (alpha != 255) { 240 if (alpha != 255) {
241 SkPaint paint; 241 SkPaint paint;
242 paint.setColor(SkColorSetARGB(alpha, 255, 255, 255)); 242 paint.setColor(SkColorSetARGB(alpha, 255, 255, 255));
243 paint.setXfermodeMode(SkXfermode::kDstIn_Mode); 243 paint.setXfermodeMode(SkXfermode::kDstIn_Mode);
244 paint.setStyle(SkPaint::kFill_Style); 244 paint.setStyle(SkPaint::kFill_Style);
245 canvas.DrawRect(gfx::Rect(0, 0, width, height), paint); 245 canvas.DrawRect(gfx::Rect(0, 0, width, height), paint);
246 } 246 }
247 247
248 if (state == views::CustomButton::BS_HOT) { 248 if (state == views::CustomButton::BS_HOT) {
249 canvas.FillRect(SkColorSetARGB(64, 255, 255, 255), 249 canvas.FillRect(gfx::Rect(size()), SkColorSetARGB(64, 255, 255, 255));
250 gfx::Rect(size()));
251 } 250 }
252 251
253 canvas.DrawBitmapInt(*overlay, 0, 0); 252 canvas.DrawBitmapInt(*overlay, 0, 0);
254 SkBitmap* mask = tp->GetBitmapNamed(IDR_NEWTAB_BUTTON_MASK); 253 SkBitmap* mask = tp->GetBitmapNamed(IDR_NEWTAB_BUTTON_MASK);
255 return SkBitmapOperations::CreateMaskedBitmap(canvas.ExtractBitmap(), *mask); 254 return SkBitmapOperations::CreateMaskedBitmap(canvas.ExtractBitmap(), *mask);
256 } 255 }
257 256
258 SkBitmap NewTabButton::GetBitmap() const { 257 SkBitmap NewTabButton::GetBitmap() const {
259 if (!hover_animation_->is_animating()) 258 if (!hover_animation_->is_animating())
260 return GetBitmapForState(state()); 259 return GetBitmapForState(state());
(...skipping 1438 matching lines...) Expand 10 before | Expand all | Expand 10 after
1699 ui::AnimationDelegate* TabStrip::CreateRemoveTabDelegate(BaseTab* tab) { 1698 ui::AnimationDelegate* TabStrip::CreateRemoveTabDelegate(BaseTab* tab) {
1700 return new RemoveTabDelegate(this, tab); 1699 return new RemoveTabDelegate(this, tab);
1701 } 1700 }
1702 1701
1703 bool TabStrip::IsPointInTab(Tab* tab, 1702 bool TabStrip::IsPointInTab(Tab* tab,
1704 const gfx::Point& point_in_tabstrip_coords) { 1703 const gfx::Point& point_in_tabstrip_coords) {
1705 gfx::Point point_in_tab_coords(point_in_tabstrip_coords); 1704 gfx::Point point_in_tab_coords(point_in_tabstrip_coords);
1706 View::ConvertPointToView(this, tab, &point_in_tab_coords); 1705 View::ConvertPointToView(this, tab, &point_in_tab_coords);
1707 return tab->HitTest(point_in_tab_coords); 1706 return tab->HitTest(point_in_tab_coords);
1708 } 1707 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/tabs/dragged_tab_view.cc ('k') | chrome/browser/ui/views/toolbar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698