summaryrefslogtreecommitdiffstats
path: root/content/ppapi_plugin/ppapi_plugin_main.cc
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-14 16:52:58 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-14 16:52:58 +0000
commit184808f27fbc5cf8dc4a9c637d644bda31c6cfe8 (patch)
tree0db99fde76ca2142910775f750596e458c5353fc /content/ppapi_plugin/ppapi_plugin_main.cc
parent254004a393625cbcf09254e1ce127319f8a3addd (diff)
downloadchromium_src-184808f27fbc5cf8dc4a9c637d644bda31c6cfe8.zip
chromium_src-184808f27fbc5cf8dc4a9c637d644bda31c6cfe8.tar.gz
chromium_src-184808f27fbc5cf8dc4a9c637d644bda31c6cfe8.tar.bz2
Move ppapi_plugin to content.
TBR=brettw Review URL: http://codereview.chromium.org/6679041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78042 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/ppapi_plugin/ppapi_plugin_main.cc')
-rw-r--r--content/ppapi_plugin/ppapi_plugin_main.cc28
1 files changed, 28 insertions, 0 deletions
diff --git a/content/ppapi_plugin/ppapi_plugin_main.cc b/content/ppapi_plugin/ppapi_plugin_main.cc
new file mode 100644
index 0000000..e18051a
--- /dev/null
+++ b/content/ppapi_plugin/ppapi_plugin_main.cc
@@ -0,0 +1,28 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/message_loop.h"
+#include "base/threading/platform_thread.h"
+#include "build/build_config.h"
+#include "chrome/common/chrome_switches.h"
+#include "content/common/child_process.h"
+#include "content/common/main_function_params.h"
+#include "content/ppapi_plugin/ppapi_thread.h"
+
+// Main function for starting the PPAPI plugin process.
+int PpapiPluginMain(const MainFunctionParams& parameters) {
+ const CommandLine& command_line = parameters.command_line_;
+ if (command_line.HasSwitch(switches::kPpapiStartupDialog)) {
+ ChildProcess::WaitForDebugger("Ppapi");
+ }
+
+ MessageLoop main_message_loop(MessageLoop::TYPE_UI);
+ base::PlatformThread::SetName("CrPPAPIMain");
+
+ ChildProcess ppapi_process;
+ ppapi_process.set_main_thread(new PpapiThread());
+
+ main_message_loop.Run();
+ return 0;
+}