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

Side by Side Diff: chrome/browser/extensions/api/themes/theme_api.cc

Issue 12253022: Manifest handler for all keys background-related. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 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 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 #include "chrome/browser/extensions/api/themes/theme_api.h" 5 #include "chrome/browser/extensions/api/themes/theme_api.h"
6 6
7 #include "base/lazy_instance.h" 7 #include "base/lazy_instance.h"
8 #include "chrome/common/extensions/api/themes/theme_handler.h" 8 #include "chrome/common/extensions/api/themes/theme_handler.h"
9 #include "chrome/common/extensions/extension_manifest_constants.h"
10 #include "chrome/common/extensions/manifest_handler.h"
11 9
12 namespace extensions { 10 namespace extensions {
13 11
14 ThemeAPI::ThemeAPI(Profile* profile) { 12 ThemeAPI::ThemeAPI(Profile* profile) {
15 // Register the ManifestHandler for parsing 'theme' manifest key. 13 (new extensions::ThemeHandler)->Register();
16 extensions::ManifestHandler::Register(
17 extension_manifest_keys::kTheme,
18 make_linked_ptr(new extensions::ThemeHandler));
19 } 14 }
20 15
21 ThemeAPI::~ThemeAPI() { 16 ThemeAPI::~ThemeAPI() {
22 } 17 }
23 18
24 static base::LazyInstance<ProfileKeyedAPIFactory<ThemeAPI> > 19 static base::LazyInstance<ProfileKeyedAPIFactory<ThemeAPI> >
25 g_factory = LAZY_INSTANCE_INITIALIZER; 20 g_factory = LAZY_INSTANCE_INITIALIZER;
26 21
27 // static 22 // static
28 ProfileKeyedAPIFactory<ThemeAPI>* ThemeAPI::GetFactoryInstance() { 23 ProfileKeyedAPIFactory<ThemeAPI>* ThemeAPI::GetFactoryInstance() {
29 return &g_factory.Get(); 24 return &g_factory.Get();
30 } 25 }
31 26
32 } // namespace extensions 27 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/runtime/runtime_api.cc ('k') | chrome/browser/extensions/component_loader_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698