| 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 "build/build_config.h" | 5 #include "build/build_config.h" |
| 6 | 6 |
| 7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 #endif | 9 #endif |
| 10 | 10 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 #endif | 37 #endif |
| 38 | 38 |
| 39 // main() routine for running as the plugin process. | 39 // main() routine for running as the plugin process. |
| 40 int PluginMain(const MainFunctionParams& parameters) { | 40 int PluginMain(const MainFunctionParams& parameters) { |
| 41 // The main thread of the plugin services UI. | 41 // The main thread of the plugin services UI. |
| 42 #if defined(OS_MACOSX) | 42 #if defined(OS_MACOSX) |
| 43 InitializeChromeApplication(); | 43 InitializeChromeApplication(); |
| 44 #endif | 44 #endif |
| 45 base::MessageLoopForUI main_message_loop; | 45 base::MessageLoopForUI main_message_loop; |
| 46 base::PlatformThread::SetName("CrPluginMain"); | 46 base::PlatformThread::SetName("CrPluginMain"); |
| 47 base::debug::TraceLog::GetInstance()->SetProcessName("Plugin Process"); | 47 base::trace_event::TraceLog::GetInstance()->SetProcessName("Plugin Process"); |
| 48 base::debug::TraceLog::GetInstance()->SetProcessSortIndex( | 48 base::trace_event::TraceLog::GetInstance()->SetProcessSortIndex( |
| 49 kTraceEventPluginProcessSortIndex); | 49 kTraceEventPluginProcessSortIndex); |
| 50 | 50 |
| 51 const base::CommandLine& parsed_command_line = parameters.command_line; | 51 const base::CommandLine& parsed_command_line = parameters.command_line; |
| 52 | 52 |
| 53 #if defined(OS_WIN) | 53 #if defined(OS_WIN) |
| 54 base::win::ScopedCOMInitializer com_initializer; | 54 base::win::ScopedCOMInitializer com_initializer; |
| 55 #endif | 55 #endif |
| 56 | 56 |
| 57 if (parsed_command_line.HasSwitch(switches::kPluginStartupDialog)) { | 57 if (parsed_command_line.HasSwitch(switches::kPluginStartupDialog)) { |
| 58 ChildProcess::WaitForDebugger("Plugin"); | 58 ChildProcess::WaitForDebugger("Plugin"); |
| 59 } | 59 } |
| 60 | 60 |
| 61 { | 61 { |
| 62 ChildProcess plugin_process; | 62 ChildProcess plugin_process; |
| 63 plugin_process.set_main_thread(new PluginThread()); | 63 plugin_process.set_main_thread(new PluginThread()); |
| 64 base::HighResolutionTimerManager hi_res_timer_manager; | 64 base::HighResolutionTimerManager hi_res_timer_manager; |
| 65 base::MessageLoop::current()->Run(); | 65 base::MessageLoop::current()->Run(); |
| 66 } | 66 } |
| 67 | 67 |
| 68 return 0; | 68 return 0; |
| 69 } | 69 } |
| 70 | 70 |
| 71 } // namespace content | 71 } // namespace content |
| OLD | NEW |