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

Side by Side Diff: chrome/common/badge_util.h

Issue 1472863004: [MD] re-skin extension browser action badges (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: undo file move Created 5 years 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/BUILD.gn ('k') | chrome/common/badge_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_COMMON_BADGE_UTIL_H_
6 #define CHROME_COMMON_BADGE_UTIL_H_
7
8 #include <string>
9
10 #include "base/strings/string16.h"
11 #include "chrome/common/extensions/api/extension_action/action_info.h"
12 #include "third_party/skia/include/core/SkBitmap.h"
13
14 class SkPaint;
15
16 namespace gfx {
17 class Canvas;
18 class Rect;
19 }
20
21 // badge_util provides a set of helper routines for rendering dynamically
22 // generated text overlays ("badges") on toolbar icons.
23 namespace badge_util {
24
25 // Helper routine that returns a singleton SkPaint object configured for
26 // rendering badge overlay text (correct font, typeface, etc).
27 SkPaint* GetBadgeTextPaintSingleton();
28
29 // Paints badge with specified parameters to |canvas|.
30 void PaintBadge(gfx::Canvas* canvas,
31 const gfx::Rect& bounds,
32 const std::string& text,
33 const SkColor& text_color_in,
34 const SkColor& background_color_in,
35 int icon_width);
36
37 } // namespace badge_util
38
39 #endif // CHROME_COMMON_BADGE_UTIL_H_
OLDNEW
« no previous file with comments | « chrome/common/BUILD.gn ('k') | chrome/common/badge_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698