Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(580)

Side by Side Diff: content/plugin/plugin_main.cc

Issue 234533002: Remove a bunch of TOOLKIT_GTK in content/ and gpu/, as well as NPAPI plugins on linux (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase, skip changing browser_main_loop.cc because of presubmit issues, will follow up Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/gpu/gpu_main.cc ('k') | content/plugin/plugin_main_linux.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 20 matching lines...) Expand all
31 31
32 namespace content { 32 namespace content {
33 33
34 #if defined(OS_MACOSX) 34 #if defined(OS_MACOSX)
35 // Removes our Carbon library interposing from the environment so that it 35 // Removes our Carbon library interposing from the environment so that it
36 // doesn't carry into any processes that plugins might start. 36 // doesn't carry into any processes that plugins might start.
37 void TrimInterposeEnvironment(); 37 void TrimInterposeEnvironment();
38 38
39 // Initializes the global Cocoa application object. 39 // Initializes the global Cocoa application object.
40 void InitializeChromeApplication(); 40 void InitializeChromeApplication();
41 #elif defined(OS_LINUX)
42 // Work around an unimplemented instruction in 64-bit Flash.
43 void WorkaroundFlashLAHF();
44 #endif 41 #endif
45 42
46 // main() routine for running as the plugin process. 43 // main() routine for running as the plugin process.
47 int PluginMain(const MainFunctionParams& parameters) { 44 int PluginMain(const MainFunctionParams& parameters) {
48 // The main thread of the plugin services UI. 45 // The main thread of the plugin services UI.
49 #if defined(OS_MACOSX) 46 #if defined(OS_MACOSX)
50 #if !defined(__LP64__) 47 #if !defined(__LP64__)
51 TrimInterposeEnvironment(); 48 TrimInterposeEnvironment();
52 #endif 49 #endif
53 InitializeChromeApplication(); 50 InitializeChromeApplication();
54 #endif 51 #endif
55 base::MessageLoopForUI main_message_loop; 52 base::MessageLoopForUI main_message_loop;
56 base::PlatformThread::SetName("CrPluginMain"); 53 base::PlatformThread::SetName("CrPluginMain");
57 base::debug::TraceLog::GetInstance()->SetProcessName("Plugin Process"); 54 base::debug::TraceLog::GetInstance()->SetProcessName("Plugin Process");
58 base::debug::TraceLog::GetInstance()->SetProcessSortIndex( 55 base::debug::TraceLog::GetInstance()->SetProcessSortIndex(
59 kTraceEventPluginProcessSortIndex); 56 kTraceEventPluginProcessSortIndex);
60 57
61 const CommandLine& parsed_command_line = parameters.command_line; 58 const CommandLine& parsed_command_line = parameters.command_line;
62 59
63 #if defined(OS_LINUX) 60 #if defined(OS_WIN)
64
65 #if defined(ARCH_CPU_64_BITS)
66 WorkaroundFlashLAHF();
67 #endif
68
69 #elif defined(OS_WIN)
70 base::win::ScopedCOMInitializer com_initializer; 61 base::win::ScopedCOMInitializer com_initializer;
71 #endif 62 #endif
72 63
73 if (parsed_command_line.HasSwitch(switches::kPluginStartupDialog)) { 64 if (parsed_command_line.HasSwitch(switches::kPluginStartupDialog)) {
74 ChildProcess::WaitForDebugger("Plugin"); 65 ChildProcess::WaitForDebugger("Plugin");
75 } 66 }
76 67
77 { 68 {
78 ChildProcess plugin_process; 69 ChildProcess plugin_process;
79 plugin_process.set_main_thread(new PluginThread()); 70 plugin_process.set_main_thread(new PluginThread());
80 base::HighResolutionTimerManager hi_res_timer_manager; 71 base::HighResolutionTimerManager hi_res_timer_manager;
81 base::MessageLoop::current()->Run(); 72 base::MessageLoop::current()->Run();
82 } 73 }
83 74
84 return 0; 75 return 0;
85 } 76 }
86 77
87 } // namespace content 78 } // namespace content
OLDNEW
« no previous file with comments | « content/gpu/gpu_main.cc ('k') | content/plugin/plugin_main_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698