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

Side by Side Diff: chrome/browser/extensions/manifest_url_parser.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) 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 #include "chrome/browser/extensions/manifest_url_parser.h" 5 #include "chrome/browser/extensions/manifest_url_parser.h"
6 6
7 #include "base/lazy_instance.h" 7 #include "base/lazy_instance.h"
8 #include "chrome/browser/extensions/extension_web_ui.h" 8 #include "chrome/browser/extensions/extension_web_ui.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/common/chrome_notification_types.h" 10 #include "chrome/common/chrome_notification_types.h"
11 #include "chrome/common/extensions/extension_manifest_constants.h"
12 #include "chrome/common/extensions/manifest_handler.h"
13 #include "chrome/common/extensions/manifest_url_handler.h" 11 #include "chrome/common/extensions/manifest_url_handler.h"
14 #include "content/public/browser/notification_details.h" 12 #include "content/public/browser/notification_details.h"
15 #include "content/public/browser/notification_service.h" 13 #include "content/public/browser/notification_service.h"
16 14
17 namespace extensions { 15 namespace extensions {
18 16
19 ManifestURLParser::ManifestURLParser(Profile* profile) 17 ManifestURLParser::ManifestURLParser(Profile* profile)
20 : profile_(profile) { 18 : profile_(profile) {
21 ManifestHandler::Register(extension_manifest_keys::kDevToolsPage, 19 (new DevToolsPageHandler)->Register();
22 make_linked_ptr(new DevToolsPageHandler)); 20 (new HomepageURLHandler)->Register();
23 ManifestHandler::Register(extension_manifest_keys::kHomepageURL, 21 (new UpdateURLHandler)->Register();
24 make_linked_ptr(new HomepageURLHandler)); 22 (new OptionsPageHandler)->Register();
25 ManifestHandler::Register(extension_manifest_keys::kUpdateURL, 23 (new URLOverridesHandler)->Register();
26 make_linked_ptr(new UpdateURLHandler));
27 ManifestHandler::Register(extension_manifest_keys::kOptionsPage,
28 make_linked_ptr(new OptionsPageHandler));
29 ManifestHandler::Register(extension_manifest_keys::kChromeURLOverrides,
30 make_linked_ptr(new URLOverridesHandler));
31 24
32 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED, 25 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED,
33 content::Source<Profile>(profile)); 26 content::Source<Profile>(profile));
34 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED, 27 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED,
35 content::Source<Profile>(profile)); 28 content::Source<Profile>(profile));
36 } 29 }
37 30
38 ManifestURLParser::~ManifestURLParser() { 31 ManifestURLParser::~ManifestURLParser() {
39 } 32 }
40 33
(...skipping 17 matching lines...) Expand all
58 static base::LazyInstance<ProfileKeyedAPIFactory<ManifestURLParser> > 51 static base::LazyInstance<ProfileKeyedAPIFactory<ManifestURLParser> >
59 g_factory = LAZY_INSTANCE_INITIALIZER; 52 g_factory = LAZY_INSTANCE_INITIALIZER;
60 53
61 // static 54 // static
62 ProfileKeyedAPIFactory<ManifestURLParser>* 55 ProfileKeyedAPIFactory<ManifestURLParser>*
63 ManifestURLParser::GetFactoryInstance() { 56 ManifestURLParser::GetFactoryInstance() {
64 return &g_factory.Get(); 57 return &g_factory.Get();
65 } 58 }
66 59
67 } // namespace extensions 60 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/lazy_background_task_queue.cc ('k') | chrome/browser/extensions/menu_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698