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

Side by Side Diff: ppapi/nacl_irt/plugin_main.cc

Issue 1174543002: ppapi: Remove use of MessageLoopProxy and deprecated MessageLoop APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix V8VarConverterTest. Created 5 years, 6 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 | « ppapi/nacl_irt/manifest_service.cc ('k') | ppapi/nacl_irt/plugin_startup.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "ppapi/nacl_irt/plugin_main.h" 5 #include "ppapi/nacl_irt/plugin_main.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 // Need to include this before most other files because it defines 8 // Need to include this before most other files because it defines
9 // IPC_MESSAGE_LOG_ENABLED. We need to use it to define 9 // IPC_MESSAGE_LOG_ENABLED. We need to use it to define
10 // IPC_MESSAGE_MACROS_LOG_ENABLED so ppapi_messages.h will generate the 10 // IPC_MESSAGE_MACROS_LOG_ENABLED so ppapi_messages.h will generate the
11 // ViewMsgLog et al. functions. 11 // ViewMsgLog et al. functions.
12 12
13 #include "base/message_loop/message_loop.h"
14 #include "base/threading/thread.h" 13 #include "base/threading/thread.h"
15 #include "ipc/ipc_logging.h" 14 #include "ipc/ipc_logging.h"
16 #include "ppapi/nacl_irt/plugin_startup.h" 15 #include "ppapi/nacl_irt/plugin_startup.h"
17 #include "ppapi/nacl_irt/ppapi_dispatcher.h" 16 #include "ppapi/nacl_irt/ppapi_dispatcher.h"
18 #include "ppapi/proxy/plugin_globals.h" 17 #include "ppapi/proxy/plugin_globals.h"
19 #include "ppapi/shared_impl/ppb_audio_shared.h" 18 #include "ppapi/shared_impl/ppb_audio_shared.h"
20 19
21 void PpapiPluginRegisterThreadCreator( 20 void PpapiPluginRegisterThreadCreator(
22 const struct PP_ThreadFunctions* thread_functions) { 21 const struct PP_ThreadFunctions* thread_functions) {
23 // Initialize all classes that need to create threads that call back into 22 // Initialize all classes that need to create threads that call back into
24 // user code. 23 // user code.
25 ppapi::PPB_Audio_Shared::SetThreadFunctions(thread_functions); 24 ppapi::PPB_Audio_Shared::SetThreadFunctions(thread_functions);
26 } 25 }
27 26
28 int PpapiPluginMain() { 27 int PpapiPluginMain() {
29 base::MessageLoop loop; 28 base::MessageLoop loop;
30 ppapi::proxy::PluginGlobals plugin_globals( 29 ppapi::proxy::PluginGlobals plugin_globals(
31 scoped_refptr<base::TaskRunner>( 30 scoped_refptr<base::TaskRunner>(ppapi::GetIOThread()->task_runner()));
32 ppapi::GetIOThread()->message_loop_proxy()));
33 31
34 ppapi::PpapiDispatcher ppapi_dispatcher( 32 ppapi::PpapiDispatcher ppapi_dispatcher(
35 ppapi::GetIOThread()->message_loop_proxy(), 33 ppapi::GetIOThread()->task_runner(), ppapi::GetShutdownEvent(),
36 ppapi::GetShutdownEvent(),
37 ppapi::GetBrowserIPCFileDescriptor(), 34 ppapi::GetBrowserIPCFileDescriptor(),
38 ppapi::GetRendererIPCFileDescriptor()); 35 ppapi::GetRendererIPCFileDescriptor());
39 plugin_globals.SetPluginProxyDelegate(&ppapi_dispatcher); 36 plugin_globals.SetPluginProxyDelegate(&ppapi_dispatcher);
40 37
41 loop.Run(); 38 loop.Run();
42 39
43 return 0; 40 return 0;
44 } 41 }
OLDNEW
« no previous file with comments | « ppapi/nacl_irt/manifest_service.cc ('k') | ppapi/nacl_irt/plugin_startup.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698