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

Side by Side Diff: ppapi/proxy/plugin_main_nacl.cc

Issue 11624021: Move tracing component to src/components (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add a DEPS rule back Created 7 years, 12 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
« components/components_tracing.gyp ('K') | « ppapi/proxy/DEPS ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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 <map> 5 #include <map>
6 #include <set> 6 #include <set>
7 7
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 // Need to include this before most other files because it defines 9 // Need to include this before most other files because it defines
10 // IPC_MESSAGE_LOG_ENABLED. We need to use it to define 10 // IPC_MESSAGE_LOG_ENABLED. We need to use it to define
11 // IPC_MESSAGE_MACROS_LOG_ENABLED so ppapi_messages.h will generate the 11 // IPC_MESSAGE_MACROS_LOG_ENABLED so ppapi_messages.h will generate the
12 // ViewMsgLog et al. functions. 12 // ViewMsgLog et al. functions.
13 13
14 #include "base/message_loop.h" 14 #include "base/message_loop.h"
15 #include "base/synchronization/waitable_event.h" 15 #include "base/synchronization/waitable_event.h"
16 #include "base/threading/thread.h" 16 #include "base/threading/thread.h"
17 #include "content/components/tracing/child_trace_message_filter.h" 17 #include "components/tracing/child_trace_message_filter.h"
18 #include "ipc/ipc_channel_handle.h" 18 #include "ipc/ipc_channel_handle.h"
19 #include "ipc/ipc_logging.h" 19 #include "ipc/ipc_logging.h"
20 #include "ipc/ipc_message.h" 20 #include "ipc/ipc_message.h"
21 #include "native_client/src/shared/ppapi_proxy/ppruntime.h" 21 #include "native_client/src/shared/ppapi_proxy/ppruntime.h"
22 #include "native_client/src/shared/srpc/nacl_srpc.h" 22 #include "native_client/src/shared/srpc/nacl_srpc.h"
23 #include "native_client/src/untrusted/irt/irt_ppapi.h" 23 #include "native_client/src/untrusted/irt/irt_ppapi.h"
24 #include "ppapi/c/ppp.h" 24 #include "ppapi/c/ppp.h"
25 #include "ppapi/c/ppp_instance.h" 25 #include "ppapi/c/ppp_instance.h"
26 #include "ppapi/proxy/plugin_dispatcher.h" 26 #include "ppapi/proxy/plugin_dispatcher.h"
27 #include "ppapi/proxy/plugin_globals.h" 27 #include "ppapi/proxy/plugin_globals.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 }; 99 };
100 100
101 PpapiDispatcher::PpapiDispatcher(scoped_refptr<base::MessageLoopProxy> io_loop) 101 PpapiDispatcher::PpapiDispatcher(scoped_refptr<base::MessageLoopProxy> io_loop)
102 : next_plugin_dispatcher_id_(0), 102 : next_plugin_dispatcher_id_(0),
103 message_loop_(io_loop), 103 message_loop_(io_loop),
104 shutdown_event_(true, false) { 104 shutdown_event_(true, false) {
105 IPC::ChannelHandle channel_handle( 105 IPC::ChannelHandle channel_handle(
106 "NaCl IPC", base::FileDescriptor(NACL_IPC_FD, false)); 106 "NaCl IPC", base::FileDescriptor(NACL_IPC_FD, false));
107 InitWithChannel(this, channel_handle, false); // Channel is server. 107 InitWithChannel(this, channel_handle, false); // Channel is server.
108 channel()->AddFilter( 108 channel()->AddFilter(
109 new content::ChildTraceMessageFilter(message_loop_)); 109 new components::ChildTraceMessageFilter(message_loop_));
110 } 110 }
111 111
112 base::MessageLoopProxy* PpapiDispatcher::GetIPCMessageLoop() { 112 base::MessageLoopProxy* PpapiDispatcher::GetIPCMessageLoop() {
113 return message_loop_.get(); 113 return message_loop_.get();
114 } 114 }
115 115
116 base::WaitableEvent* PpapiDispatcher::GetShutdownEvent() { 116 base::WaitableEvent* PpapiDispatcher::GetShutdownEvent() {
117 return &shutdown_event_; 117 return &shutdown_event_;
118 } 118 }
119 119
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 272
273 PpapiDispatcher ppapi_dispatcher(io_thread.message_loop_proxy()); 273 PpapiDispatcher ppapi_dispatcher(io_thread.message_loop_proxy());
274 plugin_globals.set_plugin_proxy_delegate(&ppapi_dispatcher); 274 plugin_globals.set_plugin_proxy_delegate(&ppapi_dispatcher);
275 275
276 loop.Run(); 276 loop.Run();
277 277
278 NaClSrpcModuleFini(); 278 NaClSrpcModuleFini();
279 279
280 return 0; 280 return 0;
281 } 281 }
OLDNEW
« components/components_tracing.gyp ('K') | « ppapi/proxy/DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698