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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 int PluginMain(const MainFunctionParams& parameters) { | 47 int PluginMain(const MainFunctionParams& parameters) { |
48 // The main thread of the plugin services UI. | 48 // The main thread of the plugin services UI. |
49 #if defined(OS_MACOSX) | 49 #if defined(OS_MACOSX) |
50 #if !defined(__LP64__) | 50 #if !defined(__LP64__) |
51 TrimInterposeEnvironment(); | 51 TrimInterposeEnvironment(); |
52 #endif | 52 #endif |
53 InitializeChromeApplication(); | 53 InitializeChromeApplication(); |
54 #endif | 54 #endif |
55 base::MessageLoop main_message_loop(base::MessageLoop::TYPE_UI); | 55 base::MessageLoop main_message_loop(base::MessageLoop::TYPE_UI); |
56 base::PlatformThread::SetName("CrPluginMain"); | 56 base::PlatformThread::SetName("CrPluginMain"); |
| 57 base::debug::TraceLog::GetInstance()->SetProcessLabel(0, 'Plugin Process'); |
| 58 base::debug::TraceLog::SetProcessSortIndex(2); |
57 | 59 |
58 base::PowerMonitor power_monitor; | 60 base::PowerMonitor power_monitor; |
59 HighResolutionTimerManager high_resolution_timer_manager; | 61 HighResolutionTimerManager high_resolution_timer_manager; |
60 | 62 |
61 const CommandLine& parsed_command_line = parameters.command_line; | 63 const CommandLine& parsed_command_line = parameters.command_line; |
62 | 64 |
63 #if defined(OS_LINUX) | 65 #if defined(OS_LINUX) |
64 | 66 |
65 #if defined(ARCH_CPU_64_BITS) | 67 #if defined(ARCH_CPU_64_BITS) |
66 WorkaroundFlashLAHF(); | 68 WorkaroundFlashLAHF(); |
(...skipping 10 matching lines...) Expand all Loading... |
77 { | 79 { |
78 ChildProcess plugin_process; | 80 ChildProcess plugin_process; |
79 plugin_process.set_main_thread(new PluginThread()); | 81 plugin_process.set_main_thread(new PluginThread()); |
80 base::MessageLoop::current()->Run(); | 82 base::MessageLoop::current()->Run(); |
81 } | 83 } |
82 | 84 |
83 return 0; | 85 return 0; |
84 } | 86 } |
85 | 87 |
86 } // namespace content | 88 } // namespace content |
OLD | NEW |