| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
| 12 #include "base/files/file_path.h" | 12 #include "base/files/file_path.h" |
| 13 #include "base/memory/ptr_util.h" | 13 #include "base/memory/ptr_util.h" |
| 14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
| 15 #include "base/time/time.h" | 15 #include "base/time/time.h" |
| 16 #include "chrome/common/file_patcher.mojom.h" | 16 #include "chrome/common/file_patcher.mojom.h" |
| 17 #include "chrome/utility/media_router/dial_device_description_parser_impl.h" |
| 17 #include "chrome/utility/utility_message_handler.h" | 18 #include "chrome/utility/utility_message_handler.h" |
| 18 #include "components/safe_json/utility/safe_json_parser_mojo_impl.h" | 19 #include "components/safe_json/utility/safe_json_parser_mojo_impl.h" |
| 19 #include "content/public/child/image_decoder_utils.h" | 20 #include "content/public/child/image_decoder_utils.h" |
| 20 #include "content/public/common/content_switches.h" | 21 #include "content/public/common/content_switches.h" |
| 21 #include "content/public/common/service_info.h" | 22 #include "content/public/common/service_info.h" |
| 22 #include "content/public/utility/utility_thread.h" | 23 #include "content/public/utility/utility_thread.h" |
| 23 #include "courgette/courgette.h" | 24 #include "courgette/courgette.h" |
| 24 #include "courgette/third_party/bsdiff/bsdiff.h" | 25 #include "courgette/third_party/bsdiff/bsdiff.h" |
| 25 #include "extensions/features/features.h" | 26 #include "extensions/features/features.h" |
| 26 #include "mojo/public/cpp/bindings/strong_binding.h" | 27 #include "mojo/public/cpp/bindings/strong_binding.h" |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 base::Bind(&safe_json::SafeJsonParserMojoImpl::Create)); | 295 base::Bind(&safe_json::SafeJsonParserMojoImpl::Create)); |
| 295 #if defined(OS_WIN) | 296 #if defined(OS_WIN) |
| 296 registry->AddInterface(base::Bind(&ShellHandlerImpl::Create)); | 297 registry->AddInterface(base::Bind(&ShellHandlerImpl::Create)); |
| 297 #endif | 298 #endif |
| 298 #if defined(OS_CHROMEOS) | 299 #if defined(OS_CHROMEOS) |
| 299 registry->AddInterface(base::Bind(&ZipFileCreatorImpl::Create)); | 300 registry->AddInterface(base::Bind(&ZipFileCreatorImpl::Create)); |
| 300 #endif | 301 #endif |
| 301 #if defined(FULL_SAFE_BROWSING) | 302 #if defined(FULL_SAFE_BROWSING) |
| 302 registry->AddInterface(base::Bind(&SafeArchiveAnalyzerImpl::Create)); | 303 registry->AddInterface(base::Bind(&SafeArchiveAnalyzerImpl::Create)); |
| 303 #endif | 304 #endif |
| 305 #if defined(ENABLE_MEDIA_ROUTER) |
| 306 registry->AddInterface( |
| 307 base::Bind(&media_router::DialDeviceDescriptionParserImpl::Create)); |
| 308 #endif // defined(ENABLE_MEDIA_ROUTER) |
| 304 } | 309 } |
| 305 | 310 |
| 306 void ChromeContentUtilityClient::RegisterServices(StaticServiceMap* services) { | 311 void ChromeContentUtilityClient::RegisterServices(StaticServiceMap* services) { |
| 307 content::ServiceInfo image_decoder_info; | 312 content::ServiceInfo image_decoder_info; |
| 308 image_decoder_info.factory = base::Bind(&CreateImageDecoderService); | 313 image_decoder_info.factory = base::Bind(&CreateImageDecoderService); |
| 309 services->insert( | 314 services->insert( |
| 310 std::make_pair(image_decoder::mojom::kServiceName, image_decoder_info)); | 315 std::make_pair(image_decoder::mojom::kServiceName, image_decoder_info)); |
| 311 } | 316 } |
| 312 | 317 |
| 313 // static | 318 // static |
| 314 void ChromeContentUtilityClient::PreSandboxStartup() { | 319 void ChromeContentUtilityClient::PreSandboxStartup() { |
| 315 #if BUILDFLAG(ENABLE_EXTENSIONS) | 320 #if BUILDFLAG(ENABLE_EXTENSIONS) |
| 316 extensions::ExtensionsHandler::PreSandboxStartup(); | 321 extensions::ExtensionsHandler::PreSandboxStartup(); |
| 317 #endif | 322 #endif |
| 318 } | 323 } |
| OLD | NEW |