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 "content/public/app/content_main_runner.h" | 5 #include "content/public/app/content_main_runner.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdlib.h> | 8 #include <stdlib.h> |
9 #include <string.h> | 9 #include <string.h> |
10 | 10 |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 | 118 |
119 #if !defined(CHROME_MULTIPLE_DLL_BROWSER) && !defined(CHROME_MULTIPLE_DLL_CHILD) | 119 #if !defined(CHROME_MULTIPLE_DLL_BROWSER) && !defined(CHROME_MULTIPLE_DLL_CHILD) |
120 #include "content/browser/gpu/gpu_main_thread_factory.h" | 120 #include "content/browser/gpu/gpu_main_thread_factory.h" |
121 #include "content/browser/renderer_host/render_process_host_impl.h" | 121 #include "content/browser/renderer_host/render_process_host_impl.h" |
122 #include "content/browser/utility_process_host_impl.h" | 122 #include "content/browser/utility_process_host_impl.h" |
123 #include "content/gpu/in_process_gpu_thread.h" | 123 #include "content/gpu/in_process_gpu_thread.h" |
124 #include "content/renderer/in_process_renderer_thread.h" | 124 #include "content/renderer/in_process_renderer_thread.h" |
125 #include "content/utility/in_process_utility_thread.h" | 125 #include "content/utility/in_process_utility_thread.h" |
126 #endif | 126 #endif |
127 | 127 |
128 #if BUILDFLAG(ENABLE_PEPPER_CDMS) | 128 #if BUILDFLAG(ENABLE_CDM_HOST_VERIFICATION) |
129 #include "content/common/media/cdm_host_files.h" | 129 #include "content/common/media/cdm_host_files.h" |
130 #endif | 130 #endif |
131 | 131 |
132 namespace content { | 132 namespace content { |
133 extern int GpuMain(const content::MainFunctionParams&); | 133 extern int GpuMain(const content::MainFunctionParams&); |
134 #if BUILDFLAG(ENABLE_PLUGINS) | 134 #if BUILDFLAG(ENABLE_PLUGINS) |
135 #if !defined(OS_LINUX) | 135 #if !defined(OS_LINUX) |
136 extern int PluginMain(const content::MainFunctionParams&); | 136 extern int PluginMain(const content::MainFunctionParams&); |
137 #endif | 137 #endif |
138 extern int PpapiPluginMain(const MainFunctionParams&); | 138 extern int PpapiPluginMain(const MainFunctionParams&); |
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
393 if (delegate) delegate->ZygoteForked(); | 393 if (delegate) delegate->ZygoteForked(); |
394 | 394 |
395 // Zygote::HandleForkRequest may have reallocated the command | 395 // Zygote::HandleForkRequest may have reallocated the command |
396 // line so update it here with the new version. | 396 // line so update it here with the new version. |
397 const base::CommandLine& command_line = | 397 const base::CommandLine& command_line = |
398 *base::CommandLine::ForCurrentProcess(); | 398 *base::CommandLine::ForCurrentProcess(); |
399 std::string process_type = | 399 std::string process_type = |
400 command_line.GetSwitchValueASCII(switches::kProcessType); | 400 command_line.GetSwitchValueASCII(switches::kProcessType); |
401 ContentClientInitializer::Set(process_type, delegate); | 401 ContentClientInitializer::Set(process_type, delegate); |
402 | 402 |
403 #if BUILDFLAG(ENABLE_PEPPER_CDMS) | 403 #if BUILDFLAG(ENABLE_CDM_HOST_VERIFICATION) |
404 if (process_type != switches::kPpapiPluginProcess) { | 404 if (process_type != switches::kPpapiPluginProcess) { |
405 DVLOG(1) << "Closing CDM files for non-ppapi process."; | 405 DVLOG(1) << "Closing CDM files for non-ppapi process."; |
406 CdmHostFiles::TakeGlobalInstance().reset(); | 406 CdmHostFiles::TakeGlobalInstance().reset(); |
407 } else { | 407 } else { |
408 DVLOG(1) << "Not closing CDM files for ppapi process."; | 408 DVLOG(1) << "Not closing CDM files for ppapi process."; |
409 } | 409 } |
410 #endif | 410 #endif |
411 | 411 |
412 MainFunctionParams main_params(command_line); | 412 MainFunctionParams main_params(command_line); |
413 main_params.zygote_child = true; | 413 main_params.zygote_child = true; |
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
896 | 896 |
897 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); | 897 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); |
898 }; | 898 }; |
899 | 899 |
900 // static | 900 // static |
901 ContentMainRunner* ContentMainRunner::Create() { | 901 ContentMainRunner* ContentMainRunner::Create() { |
902 return new ContentMainRunnerImpl(); | 902 return new ContentMainRunnerImpl(); |
903 } | 903 } |
904 | 904 |
905 } // namespace content | 905 } // namespace content |
OLD | NEW |