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

Side by Side Diff: chrome/browser/ui/views/infobars/infobar_background.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) 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/views/infobars/infobar_background.h" 5 #include "chrome/browser/ui/views/infobars/infobar_background.h"
6 6
7 #include "chrome/browser/infobars/infobar.h" 7 #include "chrome/browser/infobars/infobar.h"
8 #include "chrome/browser/ui/views/infobars/infobar_view.h" 8 #include "chrome/browser/ui/views/infobars/infobar_view.h"
9 #include "third_party/skia/include/effects/SkGradientShader.h" 9 #include "third_party/skia/include/effects/SkGradientShader.h"
10 #include "ui/gfx/canvas.h" 10 #include "ui/gfx/canvas.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 SkColorGetA(gradient_colors[0]))); 50 SkColorGetA(gradient_colors[0])));
51 paint.setStyle(SkPaint::kStroke_Style); 51 paint.setStyle(SkPaint::kStroke_Style);
52 // Anti-alias the path so it doesn't look goofy when the edges are not at 45 52 // Anti-alias the path so it doesn't look goofy when the edges are not at 45
53 // degree angles, but don't anti-alias anything else, especially not the fill, 53 // degree angles, but don't anti-alias anything else, especially not the fill,
54 // lest we get weird color bleeding problems. 54 // lest we get weird color bleeding problems.
55 paint.setAntiAlias(true); 55 paint.setAntiAlias(true);
56 canvas_skia->drawPath(infobar->stroke_path(), paint); 56 canvas_skia->drawPath(infobar->stroke_path(), paint);
57 paint.setAntiAlias(false); 57 paint.setAntiAlias(false);
58 58
59 // Now draw the separator at the bottom. 59 // Now draw the separator at the bottom.
60 canvas->FillRect(separator_color_, 60 canvas->FillRect(gfx::Rect(0, view->height() - InfoBar::kSeparatorLineHeight,
61 gfx::Rect(0, view->height() - InfoBar::kSeparatorLineHeight, 61 view->width(), InfoBar::kSeparatorLineHeight),
62 view->width(), InfoBar::kSeparatorLineHeight)); 62 separator_color_);
63 } 63 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/opaque_browser_frame_view.cc ('k') | chrome/browser/ui/views/location_bar/location_bar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698