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 #include "chrome/browser/extensions/chrome_manifest_parser.h" | 5 #include "chrome/browser/extensions/chrome_manifest_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/manifest_handlers/app_isolation_info.h" | 11 #include "chrome/common/extensions/manifest_handlers/app_isolation_info.h" |
12 #include "chrome/common/extensions/manifest_handlers/icons_handler.h" | 12 #include "chrome/common/extensions/manifest_handlers/icons_handler.h" |
13 #include "chrome/common/extensions/manifest_handlers/kiosk_enabled_info.h" | 13 #include "chrome/common/extensions/manifest_handlers/kiosk_enabled_info.h" |
14 #include "chrome/common/extensions/manifest_handlers/offline_enabled_info.h" | 14 #include "chrome/common/extensions/manifest_handlers/offline_enabled_info.h" |
15 #include "chrome/common/extensions/manifest_handlers/requirements_handler.h" | 15 #include "chrome/common/extensions/manifest_handlers/requirements_handler.h" |
| 16 #include "chrome/common/extensions/manifest_handlers/shared_module_info.h" |
16 #include "chrome/common/extensions/manifest_url_handler.h" | 17 #include "chrome/common/extensions/manifest_url_handler.h" |
17 #include "content/public/browser/notification_details.h" | 18 #include "content/public/browser/notification_details.h" |
18 #include "content/public/browser/notification_service.h" | 19 #include "content/public/browser/notification_service.h" |
19 | 20 |
20 namespace extensions { | 21 namespace extensions { |
21 | 22 |
22 ChromeManifestParser::ChromeManifestParser(Profile* profile) | 23 ChromeManifestParser::ChromeManifestParser(Profile* profile) |
23 : profile_(profile) { | 24 : profile_(profile) { |
24 (new AppIsolationHandler)->Register(); | 25 (new AppIsolationHandler)->Register(); |
25 (new DevToolsPageHandler)->Register(); | 26 (new DevToolsPageHandler)->Register(); |
26 (new KioskEnabledHandler)->Register(); | 27 (new KioskEnabledHandler)->Register(); |
27 (new HomepageURLHandler)->Register(); | 28 (new HomepageURLHandler)->Register(); |
28 (new IconsHandler)->Register(); | 29 (new IconsHandler)->Register(); |
29 (new OfflineEnabledHandler)->Register(); | 30 (new OfflineEnabledHandler)->Register(); |
30 (new OptionsPageHandler)->Register(); | 31 (new OptionsPageHandler)->Register(); |
31 (new RequirementsHandler)->Register(); | 32 (new RequirementsHandler)->Register(); |
| 33 (new SharedModuleHandler)->Register(); |
32 (new UpdateURLHandler)->Register(); | 34 (new UpdateURLHandler)->Register(); |
33 (new URLOverridesHandler)->Register(); | 35 (new URLOverridesHandler)->Register(); |
34 | 36 |
35 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED, | 37 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED, |
36 content::Source<Profile>(profile)); | 38 content::Source<Profile>(profile)); |
37 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED, | 39 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED, |
38 content::Source<Profile>(profile)); | 40 content::Source<Profile>(profile)); |
39 } | 41 } |
40 | 42 |
41 ChromeManifestParser::~ChromeManifestParser() { | 43 ChromeManifestParser::~ChromeManifestParser() { |
(...skipping 20 matching lines...) Expand all Loading... |
62 static base::LazyInstance<ProfileKeyedAPIFactory<ChromeManifestParser> > | 64 static base::LazyInstance<ProfileKeyedAPIFactory<ChromeManifestParser> > |
63 g_factory = LAZY_INSTANCE_INITIALIZER; | 65 g_factory = LAZY_INSTANCE_INITIALIZER; |
64 | 66 |
65 // static | 67 // static |
66 ProfileKeyedAPIFactory<ChromeManifestParser>* | 68 ProfileKeyedAPIFactory<ChromeManifestParser>* |
67 ChromeManifestParser::GetFactoryInstance() { | 69 ChromeManifestParser::GetFactoryInstance() { |
68 return &g_factory.Get(); | 70 return &g_factory.Get(); |
69 } | 71 } |
70 | 72 |
71 } // namespace extensions | 73 } // namespace extensions |
OLD | NEW |