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

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

Issue 11231016: Move content's a plugin, ppapi_plugin, utility, and worker subdirectories to the content namespace. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix mac Created 8 years, 2 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/plugin/plugin_interpose_util_mac.mm ('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 11 matching lines...) Expand all
22 22
23 #if defined(OS_WIN) 23 #if defined(OS_WIN)
24 #include "base/win/scoped_com_initializer.h" 24 #include "base/win/scoped_com_initializer.h"
25 #include "content/public/common/injection_test_win.h" 25 #include "content/public/common/injection_test_win.h"
26 #include "sandbox/win/src/sandbox.h" 26 #include "sandbox/win/src/sandbox.h"
27 #elif defined(OS_POSIX) && !defined(OS_MACOSX) 27 #elif defined(OS_POSIX) && !defined(OS_MACOSX)
28 #include "base/global_descriptors_posix.h" 28 #include "base/global_descriptors_posix.h"
29 #include "ipc/ipc_descriptors.h" 29 #include "ipc/ipc_descriptors.h"
30 #endif 30 #endif
31 31
32 namespace content {
33
32 #if defined(OS_MACOSX) 34 #if defined(OS_MACOSX)
33 // Removes our Carbon library interposing from the environment so that it 35 // Removes our Carbon library interposing from the environment so that it
34 // doesn't carry into any processes that plugins might start. 36 // doesn't carry into any processes that plugins might start.
35 void TrimInterposeEnvironment(); 37 void TrimInterposeEnvironment();
36 38
37 // Initializes the global Cocoa application object. 39 // Initializes the global Cocoa application object.
38 void InitializeChromeApplication(); 40 void InitializeChromeApplication();
39 #elif defined(OS_LINUX) 41 #elif defined(OS_LINUX)
40 // Work around an unimplemented instruction in 64-bit Flash. 42 // Work around an unimplemented instruction in 64-bit Flash.
41 void WorkaroundFlashLAHF(); 43 void WorkaroundFlashLAHF();
42 #endif 44 #endif
43 45
44 // main() routine for running as the plugin process. 46 // main() routine for running as the plugin process.
45 int PluginMain(const content::MainFunctionParams& parameters) { 47 int PluginMain(const MainFunctionParams& parameters) {
46 // The main thread of the plugin services UI. 48 // The main thread of the plugin services UI.
47 #if defined(OS_MACOSX) 49 #if defined(OS_MACOSX)
48 #if !defined(__LP64__) 50 #if !defined(__LP64__)
49 TrimInterposeEnvironment(); 51 TrimInterposeEnvironment();
50 #endif 52 #endif
51 InitializeChromeApplication(); 53 InitializeChromeApplication();
52 #endif 54 #endif
53 MessageLoop main_message_loop(MessageLoop::TYPE_UI); 55 MessageLoop main_message_loop(MessageLoop::TYPE_UI);
54 base::PlatformThread::SetName("CrPluginMain"); 56 base::PlatformThread::SetName("CrPluginMain");
55 57
(...skipping 17 matching lines...) Expand all
73 } 75 }
74 76
75 { 77 {
76 ChildProcess plugin_process; 78 ChildProcess plugin_process;
77 plugin_process.set_main_thread(new PluginThread()); 79 plugin_process.set_main_thread(new PluginThread());
78 MessageLoop::current()->Run(); 80 MessageLoop::current()->Run();
79 } 81 }
80 82
81 return 0; 83 return 0;
82 } 84 }
85
86 } // namespace content
OLDNEW
« no previous file with comments | « content/plugin/plugin_interpose_util_mac.mm ('k') | content/plugin/plugin_main_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698