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/themes/theme_handler.h" |
21 #include "chrome/common/extensions/extension.h" | 22 #include "chrome/common/extensions/extension.h" |
22 #include "chrome/common/extensions/extension_l10n_util.h" | 23 #include "chrome/common/extensions/extension_l10n_util.h" |
23 #include "chrome/common/extensions/extension_manifest_constants.h" | 24 #include "chrome/common/extensions/extension_manifest_constants.h" |
24 #include "chrome/common/extensions/manifest_handler.h" | 25 #include "chrome/common/extensions/manifest_handler.h" |
25 #include "chrome/common/extensions/unpacker.h" | 26 #include "chrome/common/extensions/unpacker.h" |
26 #include "chrome/common/extensions/update_manifest.h" | 27 #include "chrome/common/extensions/update_manifest.h" |
27 #include "chrome/common/web_resource/web_resource_unpacker.h" | 28 #include "chrome/common/web_resource/web_resource_unpacker.h" |
28 #include "chrome/common/zip.h" | 29 #include "chrome/common/zip.h" |
29 #include "chrome/utility/profile_import_handler.h" | 30 #include "chrome/utility/profile_import_handler.h" |
30 #include "content/public/utility/utility_thread.h" | 31 #include "content/public/utility/utility_thread.h" |
(...skipping 14 matching lines...) Expand all Loading... |
45 #include "ui/gfx/gdi_util.h" | 46 #include "ui/gfx/gdi_util.h" |
46 #endif // defined(OS_WIN) | 47 #endif // defined(OS_WIN) |
47 | 48 |
48 namespace { | 49 namespace { |
49 | 50 |
50 // Explicitly register all ManifestHandlers needed in the utility process. | 51 // Explicitly register all ManifestHandlers needed in the utility process. |
51 void RegisterExtensionManifestHandlers() { | 52 void RegisterExtensionManifestHandlers() { |
52 extensions::ManifestHandler::Register( | 53 extensions::ManifestHandler::Register( |
53 extension_manifest_keys::kBrowserAction, | 54 extension_manifest_keys::kBrowserAction, |
54 new extensions::BrowserActionHandler); | 55 new extensions::BrowserActionHandler); |
| 56 extensions::ManifestHandler::Register( |
| 57 extension_manifest_keys::kTheme, |
| 58 new extensions::ThemeHandler); |
55 } | 59 } |
56 | 60 |
57 } // namespace | 61 } // namespace |
58 | 62 |
59 namespace chrome { | 63 namespace chrome { |
60 | 64 |
61 ChromeContentUtilityClient::ChromeContentUtilityClient() { | 65 ChromeContentUtilityClient::ChromeContentUtilityClient() { |
62 #if !defined(OS_ANDROID) | 66 #if !defined(OS_ANDROID) |
63 import_handler_.reset(new ProfileImportHandler()); | 67 import_handler_.reset(new ProfileImportHandler()); |
64 #endif | 68 #endif |
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
456 } else | 460 } else |
457 #endif | 461 #endif |
458 { | 462 { |
459 Send(new ChromeUtilityHostMsg_GetPrinterCapsAndDefaults_Failed( | 463 Send(new ChromeUtilityHostMsg_GetPrinterCapsAndDefaults_Failed( |
460 printer_name)); | 464 printer_name)); |
461 } | 465 } |
462 content::UtilityThread::Get()->ReleaseProcessIfNeeded(); | 466 content::UtilityThread::Get()->ReleaseProcessIfNeeded(); |
463 } | 467 } |
464 | 468 |
465 } // namespace chrome | 469 } // namespace chrome |
OLD | NEW |