| 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/utility/chrome_content_utility_client.h" | 5 #include "chrome/utility/chrome_content_utility_client.h" |
| 6 | 6 |
| 7 #include "base/base64.h" | 7 #include "base/base64.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| 11 #include "base/json/json_reader.h" | 11 #include "base/json/json_reader.h" |
| 12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 13 #include "base/message_loop_proxy.h" | 13 #include "base/message_loop_proxy.h" |
| 14 #include "base/threading/thread.h" | 14 #include "base/threading/thread.h" |
| 15 #include "chrome/browser/importer/importer.h" | 15 #include "chrome/browser/importer/importer.h" |
| 16 #include "chrome/browser/importer/profile_import_process_messages.h" | 16 #include "chrome/browser/importer/profile_import_process_messages.h" |
| 17 #include "chrome/common/child_process_logging.h" | 17 #include "chrome/common/child_process_logging.h" |
| 18 #include "chrome/common/chrome_paths.h" | 18 #include "chrome/common/chrome_paths.h" |
| 19 #include "chrome/common/chrome_utility_messages.h" | 19 #include "chrome/common/chrome_utility_messages.h" |
| 20 #include "chrome/common/extensions/api/extension_action/browser_action_handler.h
" | 20 #include "chrome/common/extensions/api/extension_action/browser_action_handler.h
" |
| 21 #include "chrome/common/extensions/api/extension_action/page_action_handler.h" |
| 21 #include "chrome/common/extensions/api/i18n/default_locale_handler.h" | 22 #include "chrome/common/extensions/api/i18n/default_locale_handler.h" |
| 22 #include "chrome/common/extensions/api/themes/theme_handler.h" | 23 #include "chrome/common/extensions/api/themes/theme_handler.h" |
| 23 #include "chrome/common/extensions/extension.h" | 24 #include "chrome/common/extensions/extension.h" |
| 24 #include "chrome/common/extensions/extension_l10n_util.h" | 25 #include "chrome/common/extensions/extension_l10n_util.h" |
| 25 #include "chrome/common/extensions/extension_manifest_constants.h" | 26 #include "chrome/common/extensions/extension_manifest_constants.h" |
| 26 #include "chrome/common/extensions/manifest.h" | 27 #include "chrome/common/extensions/manifest.h" |
| 27 #include "chrome/common/extensions/manifest_handler.h" | 28 #include "chrome/common/extensions/manifest_handler.h" |
| 28 #include "chrome/common/extensions/unpacker.h" | 29 #include "chrome/common/extensions/unpacker.h" |
| 29 #include "chrome/common/extensions/update_manifest.h" | 30 #include "chrome/common/extensions/update_manifest.h" |
| 30 #include "chrome/common/web_resource/web_resource_unpacker.h" | 31 #include "chrome/common/web_resource/web_resource_unpacker.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 51 namespace { | 52 namespace { |
| 52 | 53 |
| 53 // Explicitly register all ManifestHandlers needed in the utility process. | 54 // Explicitly register all ManifestHandlers needed in the utility process. |
| 54 void RegisterExtensionManifestHandlers() { | 55 void RegisterExtensionManifestHandlers() { |
| 55 extensions::ManifestHandler::Register( | 56 extensions::ManifestHandler::Register( |
| 56 extension_manifest_keys::kBrowserAction, | 57 extension_manifest_keys::kBrowserAction, |
| 57 make_linked_ptr(new extensions::BrowserActionHandler)); | 58 make_linked_ptr(new extensions::BrowserActionHandler)); |
| 58 extensions::ManifestHandler::Register( | 59 extensions::ManifestHandler::Register( |
| 59 extension_manifest_keys::kDefaultLocale, | 60 extension_manifest_keys::kDefaultLocale, |
| 60 make_linked_ptr(new extensions::DefaultLocaleHandler)); | 61 make_linked_ptr(new extensions::DefaultLocaleHandler)); |
| 62 linked_ptr<extensions::PageActionHandler> page_action_handler( |
| 63 new extensions::PageActionHandler); |
| 64 extensions::ManifestHandler::Register( |
| 65 extension_manifest_keys::kPageAction, page_action_handler); |
| 66 extensions::ManifestHandler::Register( |
| 67 extension_manifest_keys::kPageActions, page_action_handler); |
| 61 extensions::ManifestHandler::Register( | 68 extensions::ManifestHandler::Register( |
| 62 extension_manifest_keys::kTheme, | 69 extension_manifest_keys::kTheme, |
| 63 make_linked_ptr(new extensions::ThemeHandler)); | 70 make_linked_ptr(new extensions::ThemeHandler)); |
| 64 } | 71 } |
| 65 | 72 |
| 66 } // namespace | 73 } // namespace |
| 67 | 74 |
| 68 namespace chrome { | 75 namespace chrome { |
| 69 | 76 |
| 70 ChromeContentUtilityClient::ChromeContentUtilityClient() { | 77 ChromeContentUtilityClient::ChromeContentUtilityClient() { |
| (...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 466 } else | 473 } else |
| 467 #endif | 474 #endif |
| 468 { | 475 { |
| 469 Send(new ChromeUtilityHostMsg_GetPrinterCapsAndDefaults_Failed( | 476 Send(new ChromeUtilityHostMsg_GetPrinterCapsAndDefaults_Failed( |
| 470 printer_name)); | 477 printer_name)); |
| 471 } | 478 } |
| 472 content::UtilityThread::Get()->ReleaseProcessIfNeeded(); | 479 content::UtilityThread::Get()->ReleaseProcessIfNeeded(); |
| 473 } | 480 } |
| 474 | 481 |
| 475 } // namespace chrome | 482 } // namespace chrome |
| OLD | NEW |