| OLD | NEW |
| 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/ppapi_dispatcher.h" | 5 #include "ppapi/nacl_irt/ppapi_dispatcher.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 // the channel. | 47 // the channel. |
| 48 channel_ = | 48 channel_ = |
| 49 IPC::SyncChannel::Create(this, GetIPCTaskRunner(), GetShutdownEvent()); | 49 IPC::SyncChannel::Create(this, GetIPCTaskRunner(), GetShutdownEvent()); |
| 50 scoped_refptr<ppapi::proxy::PluginMessageFilter> plugin_filter( | 50 scoped_refptr<ppapi::proxy::PluginMessageFilter> plugin_filter( |
| 51 new ppapi::proxy::PluginMessageFilter( | 51 new ppapi::proxy::PluginMessageFilter( |
| 52 NULL, globals->resource_reply_thread_registrar())); | 52 NULL, globals->resource_reply_thread_registrar())); |
| 53 channel_->AddFilter(plugin_filter.get()); | 53 channel_->AddFilter(plugin_filter.get()); |
| 54 globals->RegisterResourceMessageFilters(plugin_filter.get()); | 54 globals->RegisterResourceMessageFilters(plugin_filter.get()); |
| 55 | 55 |
| 56 channel_->AddFilter(new tracing::ChildTraceMessageFilter(task_runner_.get())); | 56 channel_->AddFilter(new tracing::ChildTraceMessageFilter(task_runner_.get())); |
| 57 channel_->Init(channel_handle, IPC::Channel::MODE_SERVER, true); | 57 // TODO(erikchen): fixme |
| 58 channel_->Init(channel_handle, IPC::Channel::MODE_SERVER, true, nullptr); |
| 58 } | 59 } |
| 59 | 60 |
| 60 base::SingleThreadTaskRunner* PpapiDispatcher::GetIPCTaskRunner() { | 61 base::SingleThreadTaskRunner* PpapiDispatcher::GetIPCTaskRunner() { |
| 61 return task_runner_.get(); | 62 return task_runner_.get(); |
| 62 } | 63 } |
| 63 | 64 |
| 64 base::WaitableEvent* PpapiDispatcher::GetShutdownEvent() { | 65 base::WaitableEvent* PpapiDispatcher::GetShutdownEvent() { |
| 65 return shutdown_event_; | 66 return shutdown_event_; |
| 66 } | 67 } |
| 67 | 68 |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 NOTREACHED(); | 209 NOTREACHED(); |
| 209 return; | 210 return; |
| 210 } | 211 } |
| 211 std::map<uint32, proxy::PluginDispatcher*>::iterator dispatcher = | 212 std::map<uint32, proxy::PluginDispatcher*>::iterator dispatcher = |
| 212 plugin_dispatchers_.find(id); | 213 plugin_dispatchers_.find(id); |
| 213 if (dispatcher != plugin_dispatchers_.end()) | 214 if (dispatcher != plugin_dispatchers_.end()) |
| 214 dispatcher->second->OnMessageReceived(msg); | 215 dispatcher->second->OnMessageReceived(msg); |
| 215 } | 216 } |
| 216 | 217 |
| 217 } // namespace ppapi | 218 } // namespace ppapi |
| OLD | NEW |