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

Side by Side Diff: chrome/common/icon_with_badge_image_source.cc

Issue 823133004: Cleanup: Update the path to gfx rect headers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rect_f.h Created 5 years, 11 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
« no previous file with comments | « chrome/common/badge_util.cc ('k') | chrome/common/print_messages.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/common/icon_with_badge_image_source.h" 5 #include "chrome/common/icon_with_badge_image_source.h"
6 6
7 #include "chrome/common/badge_util.h" 7 #include "chrome/common/badge_util.h"
8 //#include "ui/base/layout.h" 8 //#include "ui/base/layout.h"
9 #include "ui/gfx/canvas.h" 9 #include "ui/gfx/canvas.h"
10 #include "ui/gfx/rect.h" 10 #include "ui/gfx/geometry/rect.h"
11 11
12 IconWithBadgeImageSource::IconWithBadgeImageSource( 12 IconWithBadgeImageSource::IconWithBadgeImageSource(
13 const gfx::ImageSkia& icon, 13 const gfx::ImageSkia& icon,
14 const gfx::Size& icon_size, 14 const gfx::Size& icon_size,
15 const gfx::Size& spacing, 15 const gfx::Size& spacing,
16 const std::string& text, 16 const std::string& text,
17 const SkColor& text_color, 17 const SkColor& text_color,
18 const SkColor& background_color, 18 const SkColor& background_color,
19 extensions::ActionInfo::Type action_type) 19 extensions::ActionInfo::Type action_type)
20 : gfx::CanvasImageSource(icon_size, false), 20 : gfx::CanvasImageSource(icon_size, false),
(...skipping 10 matching lines...) Expand all
31 void IconWithBadgeImageSource::Draw(gfx::Canvas* canvas) { 31 void IconWithBadgeImageSource::Draw(gfx::Canvas* canvas) {
32 canvas->DrawImageInt(icon_, 0, 0, SkPaint()); 32 canvas->DrawImageInt(icon_, 0, 0, SkPaint());
33 gfx::Rect bounds(size_.width() + spacing_.width(), 33 gfx::Rect bounds(size_.width() + spacing_.width(),
34 size_.height() + spacing_.height()); 34 size_.height() + spacing_.height());
35 35
36 // Draw a badge on the provided browser action icon's canvas. 36 // Draw a badge on the provided browser action icon's canvas.
37 badge_util::PaintBadge(canvas, bounds, text_, text_color_, 37 badge_util::PaintBadge(canvas, bounds, text_, text_color_,
38 background_color_, size_.width(), 38 background_color_, size_.width(),
39 action_type_); 39 action_type_);
40 } 40 }
OLDNEW
« no previous file with comments | « chrome/common/badge_util.cc ('k') | chrome/common/print_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698