Chromium Code Reviews| OLD | NEW |
|---|---|
| (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_BROWSER_EXTENSIONS_EXTENSION_ACTION_UTIL_H_ | |
| 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_ACTION_UTIL_H_ | |
| 7 | |
| 8 // Utility functions for ExtensionActions that depend on code in the browser | |
| 9 // component. | |
| 10 | |
| 11 #include "third_party/skia/include/core/SkColor.h" | |
| 12 | |
| 13 class ExtensionAction; | |
| 14 | |
| 15 namespace gfx { | |
| 16 class Canvas; | |
| 17 class Rect; | |
| 18 } | |
| 19 namespace ui { | |
| 20 class ThemeProvider; | |
| 21 } | |
| 22 | |
| 23 namespace extensions { | |
| 24 | |
| 25 // Paint the background and border for |action| on |tab_id|. |bounds| should | |
| 26 // include the top and bottom of the location bar, and the middle column | |
| 27 // exactly between two ExtensionActions, so both ExtensionActions can draw on | |
| 28 // it. This background is only drawn for script badges in the WANTS_ATTENTION | |
| 29 // state, and (when text is black and the background is white) consists of a | |
| 30 // dark grey, 1px border and a lighter grey background with a slight vertical | |
| 31 // gradient. | |
| 32 void PaintExtensionActionBackground(const ExtensionAction& action, | |
|
Peter Kasting
2012/09/07 22:29:33
This should be in some subdirectory of chrome/brow
Jeffrey Yasskin
2012/09/11 01:16:56
Done.
| |
| 33 int tab_id, | |
| 34 gfx::Canvas* canvas, | |
| 35 const gfx::Rect& bounds, | |
| 36 SkColor text_color, | |
| 37 SkColor background_color); | |
| 38 | |
| 39 } // namespace extensions | |
| 40 | |
| 41 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_ACTION_UTIL_H_ | |
| OLD | NEW |