| 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 <stdlib.h> | 7 #include <stdlib.h> |
| 8 | 8 |
| 9 #include "base/allocator/allocator_extension.h" | 9 #include "base/allocator/allocator_extension.h" |
| 10 #include "base/at_exit.h" | 10 #include "base/at_exit.h" |
| (...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 416 // Returns the exit code for this process. | 416 // Returns the exit code for this process. |
| 417 int RunNamedProcessTypeMain( | 417 int RunNamedProcessTypeMain( |
| 418 const std::string& process_type, | 418 const std::string& process_type, |
| 419 const MainFunctionParams& main_function_params, | 419 const MainFunctionParams& main_function_params, |
| 420 ContentMainDelegate* delegate) { | 420 ContentMainDelegate* delegate) { |
| 421 static const MainFunction kMainFunctions[] = { | 421 static const MainFunction kMainFunctions[] = { |
| 422 { "", BrowserMain }, | 422 { "", BrowserMain }, |
| 423 { switches::kRendererProcess, RendererMain }, | 423 { switches::kRendererProcess, RendererMain }, |
| 424 { switches::kPluginProcess, PluginMain }, | 424 { switches::kPluginProcess, PluginMain }, |
| 425 { switches::kWorkerProcess, WorkerMain }, | 425 { switches::kWorkerProcess, WorkerMain }, |
| 426 #if defined(ENABLE_PPAPI) |
| 426 { switches::kPpapiPluginProcess, PpapiPluginMain }, | 427 { switches::kPpapiPluginProcess, PpapiPluginMain }, |
| 427 { switches::kPpapiBrokerProcess, PpapiBrokerMain }, | 428 { switches::kPpapiBrokerProcess, PpapiBrokerMain }, |
| 429 #endif |
| 428 { switches::kUtilityProcess, UtilityMain }, | 430 { switches::kUtilityProcess, UtilityMain }, |
| 429 { switches::kGpuProcess, GpuMain }, | 431 { switches::kGpuProcess, GpuMain }, |
| 430 }; | 432 }; |
| 431 | 433 |
| 432 for (size_t i = 0; i < arraysize(kMainFunctions); ++i) { | 434 for (size_t i = 0; i < arraysize(kMainFunctions); ++i) { |
| 433 if (process_type == kMainFunctions[i].name) { | 435 if (process_type == kMainFunctions[i].name) { |
| 434 if (delegate) { | 436 if (delegate) { |
| 435 int exit_code = delegate->RunProcess(process_type, | 437 int exit_code = delegate->RunProcess(process_type, |
| 436 main_function_params); | 438 main_function_params); |
| 437 #if defined(OS_ANDROID) | 439 #if defined(OS_ANDROID) |
| (...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 799 | 801 |
| 800 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); | 802 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); |
| 801 }; | 803 }; |
| 802 | 804 |
| 803 // static | 805 // static |
| 804 ContentMainRunner* ContentMainRunner::Create() { | 806 ContentMainRunner* ContentMainRunner::Create() { |
| 805 return new ContentMainRunnerImpl(); | 807 return new ContentMainRunnerImpl(); |
| 806 } | 808 } |
| 807 | 809 |
| 808 } // namespace content | 810 } // namespace content |
| OLD | NEW |