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

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

Issue 1852593004: Remove content/plugin (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove_npapi_test_plugin
Patch Set: . Created 4 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
« no previous file with comments | « content/plugin/plugin_interpose_util_mac.mm ('k') | content/plugin/plugin_main_mac.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "build/build_config.h"
6
7 #if defined(OS_WIN)
8 #include <windows.h>
9 #endif
10
11 #include "base/bind.h"
12 #include "base/command_line.h"
13 #include "base/message_loop/message_loop.h"
14 #include "base/strings/string_util.h"
15 #include "base/threading/platform_thread.h"
16 #include "base/timer/hi_res_timer_manager.h"
17 #include "content/child/child_process.h"
18 #include "content/common/content_constants_internal.h"
19 #include "content/plugin/plugin_thread.h"
20 #include "content/public/common/content_switches.h"
21 #include "content/public/common/main_function_params.h"
22
23 #if defined(OS_WIN)
24 #include "base/win/scoped_com_initializer.h"
25 #include "content/public/common/injection_test_win.h"
26 #include "sandbox/win/src/sandbox.h"
27 #elif defined(OS_POSIX) && !defined(OS_MACOSX)
28 #include "base/posix/global_descriptors.h"
29 #include "ipc/ipc_descriptors.h"
30 #endif
31
32 namespace content {
33
34 #if defined(OS_MACOSX)
35 // Initializes the global Cocoa application object.
36 void InitializeChromeApplication();
37 #endif
38
39 // main() routine for running as the plugin process.
40 int PluginMain(const MainFunctionParams& parameters) {
41 // The main thread of the plugin services UI.
42 #if defined(OS_MACOSX)
43 InitializeChromeApplication();
44 #endif
45 base::MessageLoopForUI main_message_loop;
46 base::PlatformThread::SetName("CrPluginMain");
47 base::trace_event::TraceLog::GetInstance()->SetProcessName("Plugin Process");
48 base::trace_event::TraceLog::GetInstance()->SetProcessSortIndex(
49 kTraceEventPluginProcessSortIndex);
50
51 const base::CommandLine& parsed_command_line = parameters.command_line;
52
53 #if defined(OS_WIN)
54 base::win::ScopedCOMInitializer com_initializer;
55 #endif
56
57 if (parsed_command_line.HasSwitch(switches::kPluginStartupDialog)) {
58 ChildProcess::WaitForDebugger("Plugin");
59 }
60
61 {
62 ChildProcess plugin_process;
63 plugin_process.set_main_thread(new PluginThread());
64 base::HighResolutionTimerManager hi_res_timer_manager;
65 base::MessageLoop::current()->Run();
66 }
67
68 return 0;
69 }
70
71 } // namespace content
OLDNEW
« no previous file with comments | « content/plugin/plugin_interpose_util_mac.mm ('k') | content/plugin/plugin_main_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698