diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-20 22:20:20 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-20 22:20:20 +0000 |
commit | f717ea6403554cc60a5dd9312fe585cdf64a8815 (patch) | |
tree | 523186875fe4c36bcc1c6905b3da36943a174318 /chrome/plugin/plugin_main.cc | |
parent | e74b81de4f2785b5cff5cb0cc85e76b3d434248e (diff) | |
download | chromium_src-f717ea6403554cc60a5dd9312fe585cdf64a8815.zip chromium_src-f717ea6403554cc60a5dd9312fe585cdf64a8815.tar.gz chromium_src-f717ea6403554cc60a5dd9312fe585cdf64a8815.tar.bz2 |
Switch the first thread in a child process to be the main thread, and make the IO thread be the second thread. The change is needed for plugins on mac.
Review URL: http://codereview.chromium.org/149558
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21117 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/plugin/plugin_main.cc')
-rw-r--r-- | chrome/plugin/plugin_main.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/chrome/plugin/plugin_main.cc b/chrome/plugin/plugin_main.cc index 375831a..851a6f3 100644 --- a/chrome/plugin/plugin_main.cc +++ b/chrome/plugin/plugin_main.cc @@ -29,8 +29,8 @@ // main() routine for running as the plugin process. int PluginMain(const MainFunctionParams& parameters) { - // The main thread of the plugin services IO. - MessageLoopForIO main_message_loop; + // The main thread of the plugin services UI. + MessageLoop main_message_loop(MessageLoop::TYPE_UI); std::wstring app_name = chrome::kBrowserAppName; PlatformThread::SetName(WideToASCII(app_name + L"_PluginMain").c_str()); @@ -80,7 +80,8 @@ int PluginMain(const MainFunctionParams& parameters) { } { - ChildProcess plugin_process(new PluginThread()); + ChildProcess plugin_process; + plugin_process.set_main_thread(new PluginThread()); #if defined(OS_WIN) if (!no_sandbox && target_services) target_services->LowerToken(); |