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