| 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/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" | 11 #include "chrome/common/extensions/extension_manifest_constants.h" |
| 12 #include "chrome/common/extensions/manifest_handler.h" | 12 #include "chrome/common/extensions/manifest_handler.h" |
| 13 #include "chrome/common/extensions/manifest_url_handler.h" | 13 #include "chrome/common/extensions/manifest_url_handler.h" |
| 14 #include "content/public/browser/notification_details.h" | 14 #include "content/public/browser/notification_details.h" |
| 15 #include "content/public/browser/notification_service.h" | 15 #include "content/public/browser/notification_service.h" |
| 16 | 16 |
| 17 namespace extensions { | 17 namespace extensions { |
| 18 | 18 |
| 19 ManifestURLParser::ManifestURLParser(Profile* profile) | 19 ManifestURLParser::ManifestURLParser(Profile* profile) |
| 20 : profile_(profile) { | 20 : profile_(profile) { |
| 21 ManifestHandler::Register(extension_manifest_keys::kDevToolsPage, | 21 ManifestHandler::Register(extension_manifest_keys::kDevToolsPage, |
| 22 new DevToolsPageHandler); | 22 new DevToolsPageHandler); |
| 23 ManifestHandler::Register(extension_manifest_keys::kHomepageURL, | 23 ManifestHandler::Register(extension_manifest_keys::kHomepageURL, |
| 24 new HomepageURLHandler); | 24 new HomepageURLHandler); |
| 25 ManifestHandler::Register(extension_manifest_keys::kUpdateURL, |
| 26 new UpdateURLHandler); |
| 27 ManifestHandler::Register(extension_manifest_keys::kOptionsPage, |
| 28 new OptionsPageHandler); |
| 25 ManifestHandler::Register(extension_manifest_keys::kChromeURLOverrides, | 29 ManifestHandler::Register(extension_manifest_keys::kChromeURLOverrides, |
| 26 new URLOverridesHandler); | 30 new URLOverridesHandler); |
| 27 | 31 |
| 28 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED, | 32 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED, |
| 29 content::Source<Profile>(profile)); | 33 content::Source<Profile>(profile)); |
| 30 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED, | 34 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED, |
| 31 content::Source<Profile>(profile)); | 35 content::Source<Profile>(profile)); |
| 32 } | 36 } |
| 33 | 37 |
| 34 ManifestURLParser::~ManifestURLParser() { | 38 ManifestURLParser::~ManifestURLParser() { |
| (...skipping 19 matching lines...) Expand all Loading... |
| 54 static base::LazyInstance<ProfileKeyedAPIFactory<ManifestURLParser> > | 58 static base::LazyInstance<ProfileKeyedAPIFactory<ManifestURLParser> > |
| 55 g_factory = LAZY_INSTANCE_INITIALIZER; | 59 g_factory = LAZY_INSTANCE_INITIALIZER; |
| 56 | 60 |
| 57 // static | 61 // static |
| 58 ProfileKeyedAPIFactory<ManifestURLParser>* | 62 ProfileKeyedAPIFactory<ManifestURLParser>* |
| 59 ManifestURLParser::GetFactoryInstance() { | 63 ManifestURLParser::GetFactoryInstance() { |
| 60 return &g_factory.Get(); | 64 return &g_factory.Get(); |
| 61 } | 65 } |
| 62 | 66 |
| 63 } // namespace extensions | 67 } // namespace extensions |
| OLD | NEW |