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

Side by Side Diff: content/ppapi_plugin/ppapi_broker_main.cc

Issue 14335017: content: Use base::MessageLoop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 7 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/message_loop.h" 5 #include "base/message_loop.h"
6 #include "base/threading/platform_thread.h" 6 #include "base/threading/platform_thread.h"
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 #include "content/common/child_process.h" 8 #include "content/common/child_process.h"
9 #include "content/ppapi_plugin/ppapi_thread.h" 9 #include "content/ppapi_plugin/ppapi_thread.h"
10 #include "content/public/common/content_switches.h" 10 #include "content/public/common/content_switches.h"
11 #include "content/public/common/main_function_params.h" 11 #include "content/public/common/main_function_params.h"
12 12
13 namespace content { 13 namespace content {
14 14
15 // Main function for starting the PPAPI broker process. 15 // Main function for starting the PPAPI broker process.
16 int PpapiBrokerMain(const MainFunctionParams& parameters) { 16 int PpapiBrokerMain(const MainFunctionParams& parameters) {
17 const CommandLine& command_line = parameters.command_line; 17 const CommandLine& command_line = parameters.command_line;
18 if (command_line.HasSwitch(switches::kPpapiStartupDialog)) { 18 if (command_line.HasSwitch(switches::kPpapiStartupDialog)) {
19 ChildProcess::WaitForDebugger("PpapiBroker"); 19 ChildProcess::WaitForDebugger("PpapiBroker");
20 } 20 }
21 21
22 MessageLoop main_message_loop(MessageLoop::TYPE_DEFAULT); 22 base::MessageLoop main_message_loop(base::MessageLoop::TYPE_DEFAULT);
23 base::PlatformThread::SetName("CrPPAPIBrokerMain"); 23 base::PlatformThread::SetName("CrPPAPIBrokerMain");
24 24
25 ChildProcess ppapi_broker_process; 25 ChildProcess ppapi_broker_process;
26 ppapi_broker_process.set_main_thread( 26 ppapi_broker_process.set_main_thread(
27 new PpapiThread(parameters.command_line, true)); // Broker. 27 new PpapiThread(parameters.command_line, true)); // Broker.
28 28
29 main_message_loop.Run(); 29 main_message_loop.Run();
30 DVLOG(1) << "PpapiBrokerMain exiting"; 30 DVLOG(1) << "PpapiBrokerMain exiting";
31 return 0; 31 return 0;
32 } 32 }
33 33
34 } // namespace content 34 } // namespace content
OLDNEW
« no previous file with comments | « content/ppapi_plugin/plugin_process_dispatcher.cc ('k') | content/ppapi_plugin/ppapi_plugin_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698