OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef EXTENSIONS_BROWSER_EXTENSION_ICON_PLACEHOLDER_H_ | 5 #ifndef EXTENSIONS_BROWSER_EXTENSION_ICON_PLACEHOLDER_H_ |
6 #define EXTENSIONS_BROWSER_EXTENSION_ICON_PLACEHOLDER_H_ | 6 #define EXTENSIONS_BROWSER_EXTENSION_ICON_PLACEHOLDER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "base/strings/string16.h" | 11 #include "base/strings/string16.h" |
12 #include "extensions/common/constants.h" | 12 #include "extensions/common/constants.h" |
13 #include "ui/gfx/image/canvas_image_source.h" | 13 #include "ui/gfx/image/canvas_image_source.h" |
14 #include "ui/gfx/image/image.h" | 14 #include "ui/gfx/image/image.h" |
15 | 15 |
16 namespace gfx { | 16 namespace gfx { |
17 class Canvas; | 17 class Canvas; |
18 class Size; | |
19 } | 18 } |
20 | 19 |
21 namespace extensions { | 20 namespace extensions { |
22 | 21 |
23 // An extension icon image with a gray background and the first letter of the | 22 // An extension icon image with a gray background and the first letter of the |
24 // extension name, so that not all extensions without an icon look the same. | 23 // extension name, so that not all extensions without an icon look the same. |
25 class ExtensionIconPlaceholder : public gfx::CanvasImageSource { | 24 class ExtensionIconPlaceholder : public gfx::CanvasImageSource { |
26 public: | 25 public: |
27 ExtensionIconPlaceholder(extension_misc::ExtensionIcons size, | 26 ExtensionIconPlaceholder(extension_misc::ExtensionIcons size, |
28 const std::string& name); | 27 const std::string& name); |
(...skipping 16 matching lines...) Expand all Loading... |
45 | 44 |
46 // The gray background image, on top of which the letter is drawn. | 45 // The gray background image, on top of which the letter is drawn. |
47 gfx::Image base_image_; | 46 gfx::Image base_image_; |
48 | 47 |
49 DISALLOW_COPY_AND_ASSIGN(ExtensionIconPlaceholder); | 48 DISALLOW_COPY_AND_ASSIGN(ExtensionIconPlaceholder); |
50 }; | 49 }; |
51 | 50 |
52 } // namespace extensions | 51 } // namespace extensions |
53 | 52 |
54 #endif // EXTENSIONS_BROWSER_EXTENSION_ICON_PLACEHOLDER_H_ | 53 #endif // EXTENSIONS_BROWSER_EXTENSION_ICON_PLACEHOLDER_H_ |
OLD | NEW |