OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/message_loop.h" | 6 #include "base/message_loop.h" |
7 #include "base/path_service.h" | 7 #include "base/path_service.h" |
8 #include "base/platform_thread.h" | 8 #include "base/platform_thread.h" |
9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
10 #include "base/system_monitor.h" | 10 #include "base/system_monitor.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 if (command_line.HasSwitch(switches::kRendererStartupDialog)) { | 39 if (command_line.HasSwitch(switches::kRendererStartupDialog)) { |
40 std::wstring title = l10n_util::GetString(IDS_PRODUCT_NAME); | 40 std::wstring title = l10n_util::GetString(IDS_PRODUCT_NAME); |
41 title += L" renderer"; // makes attaching to process easier | 41 title += L" renderer"; // makes attaching to process easier |
42 MessageBox(NULL, L"renderer starting...", title.c_str(), | 42 MessageBox(NULL, L"renderer starting...", title.c_str(), |
43 MB_OK | MB_SETFOREGROUND); | 43 MB_OK | MB_SETFOREGROUND); |
44 } | 44 } |
45 } | 45 } |
46 | 46 |
47 // mainline routine for running as the Rendererer process | 47 // mainline routine for running as the Rendererer process |
48 int RendererMain(const MainFunctionParams& parameters) { | 48 int RendererMain(const MainFunctionParams& parameters) { |
49 CommandLine& parsed_command_line = parameters.command_line_; | 49 const CommandLine& parsed_command_line = parameters.command_line_; |
50 sandbox::TargetServices* target_services = | 50 sandbox::TargetServices* target_services = |
51 parameters.sandbox_info_.TargetServices(); | 51 parameters.sandbox_info_.TargetServices(); |
52 | 52 |
53 StatsScope<StatsCounterTimer> | 53 StatsScope<StatsCounterTimer> |
54 startup_timer(chrome::Counters::renderer_main()); | 54 startup_timer(chrome::Counters::renderer_main()); |
55 | 55 |
56 // The main thread of the renderer services IO. | 56 // The main thread of the renderer services IO. |
57 MessageLoopForIO main_message_loop; | 57 MessageLoopForIO main_message_loop; |
58 std::wstring app_name = chrome::kBrowserAppName; | 58 std::wstring app_name = chrome::kBrowserAppName; |
59 PlatformThread::SetName(WideToASCII(app_name + L"_RendererMain").c_str()); | 59 PlatformThread::SetName(WideToASCII(app_name + L"_RendererMain").c_str()); |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 MessageLoop::current()->Run(); | 116 MessageLoop::current()->Run(); |
117 } | 117 } |
118 | 118 |
119 RenderProcess::GlobalCleanup(); | 119 RenderProcess::GlobalCleanup(); |
120 } | 120 } |
121 | 121 |
122 CoUninitialize(); | 122 CoUninitialize(); |
123 return 0; | 123 return 0; |
124 } | 124 } |
125 | 125 |
OLD | NEW |