| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/base_switches.h" | 5 #include "base/base_switches.h" |
| 6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
| 7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
| 8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
| 9 #include "base/threading/platform_thread.h" | 9 #include "base/threading/platform_thread.h" |
| 10 #include "chrome/worker/worker_thread.h" | |
| 11 #include "content/common/child_process.h" | 10 #include "content/common/child_process.h" |
| 12 #include "content/common/hi_res_timer_manager.h" | 11 #include "content/common/hi_res_timer_manager.h" |
| 13 #include "content/common/main_function_params.h" | 12 #include "content/common/main_function_params.h" |
| 13 #include "content/worker/worker_thread.h" |
| 14 #include "ui/base/system_monitor/system_monitor.h" | 14 #include "ui/base/system_monitor/system_monitor.h" |
| 15 | 15 |
| 16 #if defined(OS_WIN) | 16 #if defined(OS_WIN) |
| 17 #include "content/common/sandbox_init_wrapper.h" | 17 #include "content/common/sandbox_init_wrapper.h" |
| 18 #include "sandbox/src/sandbox.h" | 18 #include "sandbox/src/sandbox.h" |
| 19 #endif | 19 #endif |
| 20 | 20 |
| 21 // Mainline routine for running as the worker process. | 21 // Mainline routine for running as the worker process. |
| 22 int WorkerMain(const MainFunctionParams& parameters) { | 22 int WorkerMain(const MainFunctionParams& parameters) { |
| 23 // The main message loop of the worker process. | 23 // The main message loop of the worker process. |
| (...skipping 22 matching lines...) Expand all Loading... |
| 46 if (parsed_command_line.HasSwitch(switches::kWaitForDebugger)) { | 46 if (parsed_command_line.HasSwitch(switches::kWaitForDebugger)) { |
| 47 ChildProcess::WaitForDebugger("Worker"); | 47 ChildProcess::WaitForDebugger("Worker"); |
| 48 } | 48 } |
| 49 | 49 |
| 50 // Load the accelerator table from the browser executable and tell the | 50 // Load the accelerator table from the browser executable and tell the |
| 51 // message loop to use it when translating messages. | 51 // message loop to use it when translating messages. |
| 52 MessageLoop::current()->Run(); | 52 MessageLoop::current()->Run(); |
| 53 | 53 |
| 54 return 0; | 54 return 0; |
| 55 } | 55 } |
| OLD | NEW |