OLD | NEW |
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 #ifndef EXTENSIONS_COMMON_CONSTANTS_H_ | 5 #ifndef EXTENSIONS_COMMON_CONSTANTS_H_ |
6 #define EXTENSIONS_COMMON_CONSTANTS_H_ | 6 #define EXTENSIONS_COMMON_CONSTANTS_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "ui/base/layout.h" |
10 | 11 |
11 namespace extensions { | 12 namespace extensions { |
12 | 13 |
13 // Scheme we serve extension content from. | 14 // Scheme we serve extension content from. |
14 extern const char kExtensionScheme[]; | 15 extern const char kExtensionScheme[]; |
15 | 16 |
16 // Canonical schemes you can use as input to GURL.SchemeIs(). | 17 // Canonical schemes you can use as input to GURL.SchemeIs(). |
17 extern const char kExtensionResourceScheme[]; | 18 extern const char kExtensionResourceScheme[]; |
18 | 19 |
19 // The name of the manifest inside an extension. | 20 // The name of the manifest inside an extension. |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 EXTENSION_ICON_SMALLISH = 24, | 122 EXTENSION_ICON_SMALLISH = 24, |
122 EXTENSION_ICON_ACTION = 19, | 123 EXTENSION_ICON_ACTION = 19, |
123 EXTENSION_ICON_BITTY = 16, | 124 EXTENSION_ICON_BITTY = 16, |
124 EXTENSION_ICON_INVALID = 0, | 125 EXTENSION_ICON_INVALID = 0, |
125 }; | 126 }; |
126 | 127 |
127 // List of sizes for extension icons that can be defined in the manifest. | 128 // List of sizes for extension icons that can be defined in the manifest. |
128 extern const int kExtensionIconSizes[]; | 129 extern const int kExtensionIconSizes[]; |
129 extern const size_t kNumExtensionIconSizes; | 130 extern const size_t kNumExtensionIconSizes; |
130 | 131 |
131 // List of sizes for extension icons that can be defined in the manifest. | 132 struct IconRepresentationInfo { |
132 extern const int kExtensionActionIconSizes[]; | 133 // Size in pixels. |
133 extern const size_t kNumExtensionActionIconSizes; | 134 const int size; |
| 135 // Size as a string that will be used to retrieve representation value from |
| 136 // ExtensionAction SetIcon function arguments. |
| 137 const char* const size_string; |
| 138 // Scale factor for which the representation should be used. |
| 139 const ui::ScaleFactor scale; |
| 140 }; |
| 141 |
| 142 // The icon representations for extension actions. |
| 143 extern const IconRepresentationInfo kExtensionActionIconSizes[]; |
| 144 const size_t kNumExtensionActionIconSizes = 2u; |
134 | 145 |
135 } // namespace extension_misc | 146 } // namespace extension_misc |
136 | 147 |
137 #endif // EXTENSIONS_COMMON_CONSTANTS_H_ | 148 #endif // EXTENSIONS_COMMON_CONSTANTS_H_ |
OLD | NEW |