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

Side by Side Diff: chrome/common/extensions/api/themes/theme_handler.h

Issue 11968032: Move 'theme' parsing out of Extension class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed IncognitoAutofillManagerTest unittest Created 7 years, 10 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
OLDNEW
(Empty)
1 // Copyright (c) 2013 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_EXTENSIONS_API_THEMES_THEME_HANDLER_H_
6 #define CHROME_COMMON_EXTENSIONS_API_THEMES_THEME_HANDLER_H_
7
8 #include "chrome/common/extensions/extension.h"
9 #include "chrome/common/extensions/manifest_handler.h"
10
11 namespace base {
12 class DictionaryValue;
13 }
14
15 namespace extensions {
16
17 // A structure to hold the parsed theme data.
18 struct ThemeInfo : public Extension::ManifestData {
19 // Define out of line constructor/destructor to please Clang.
20 ThemeInfo();
21 virtual ~ThemeInfo();
22
23 static base::DictionaryValue* GetThemeImages(const Extension* extension);
24 static base::DictionaryValue* GetThemeColors(const Extension* extension);
25 static base::DictionaryValue* GetThemeTints(const Extension* extension);
26 static base::DictionaryValue* GetThemeDisplayProperties(
27 const Extension* extension);
28
29 // A map of resource id's to relative file paths.
30 scoped_ptr<base::DictionaryValue> theme_images_;
31
32 // A map of color names to colors.
33 scoped_ptr<base::DictionaryValue> theme_colors_;
34
35 // A map of color names to colors.
36 scoped_ptr<base::DictionaryValue> theme_tints_;
37
38 // A map of display properties.
39 scoped_ptr<base::DictionaryValue> theme_display_properties_;
40 };
41
42 // Parses the "theme" manifest key.
43 class ThemeHandler : public ManifestHandler {
44 public:
45 ThemeHandler();
46 virtual ~ThemeHandler();
47
48 virtual bool Parse(Extension* extension, string16* error) OVERRIDE;
49
50 private:
51 DISALLOW_COPY_AND_ASSIGN(ThemeHandler);
52 };
53
54 } // namespace extensions
55
56 #endif // CHROME_COMMON_EXTENSIONS_API_THEMES_THEME_HANDLER_H_
OLDNEW
« no previous file with comments | « chrome/common/extensions/api/i18n/default_locale_handler.h ('k') | chrome/common/extensions/api/themes/theme_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698