| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chrome/browser/extensions/api/extension_urls/extension_urls_api.h" |
| 6 |
| 7 #include "base/lazy_instance.h" |
| 8 #include "chrome/common/extensions/api/extension_urls/extension_urls_handler.h" |
| 9 #include "chrome/common/extensions/extension_manifest_constants.h" |
| 10 #include "chrome/common/extensions/manifest_handler.h" |
| 11 |
| 12 namespace extensions { |
| 13 |
| 14 static base::LazyInstance<ProfileKeyedAPIFactory<ExtensionURLsAPI> > |
| 15 g_factory = LAZY_INSTANCE_INITIALIZER; |
| 16 |
| 17 template <> |
| 18 ProfileKeyedAPIFactory<ExtensionURLsAPI>* |
| 19 ProfileKeyedAPIFactory<ExtensionURLsAPI>::GetInstance() { |
| 20 return &g_factory.Get(); |
| 21 } |
| 22 |
| 23 ExtensionURLsAPI::ExtensionURLsAPI(Profile* profile) { |
| 24 ManifestHandler::Register(extension_manifest_keys::kDevToolsPage, |
| 25 new DevToolsPageHandler); |
| 26 ManifestHandler::Register(extension_manifest_keys::kHomepageURL, |
| 27 new HomepageURLHandler); |
| 28 ManifestHandler::Register(extension_manifest_keys::kOptionsPage, |
| 29 new OptionsPageHandler); |
| 30 ManifestHandler::Register(extension_manifest_keys::kUpdateURL, |
| 31 new UpdateURLHandler); |
| 32 } |
| 33 |
| 34 ExtensionURLsAPI::~ExtensionURLsAPI() { |
| 35 } |
| 36 |
| 37 } // namespace extensions |
| 38 |
| OLD | NEW |