OLD | NEW |
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 "ppapi/proxy/plugin_dispatcher.h" | 5 #include "ppapi/proxy/plugin_dispatcher.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 | 8 |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 PluginDelegate* delegate, | 164 PluginDelegate* delegate, |
165 base::ProcessId peer_pid, | 165 base::ProcessId peer_pid, |
166 const IPC::ChannelHandle& channel_handle, | 166 const IPC::ChannelHandle& channel_handle, |
167 bool is_client) { | 167 bool is_client) { |
168 if (!Dispatcher::InitWithChannel(delegate, peer_pid, channel_handle, | 168 if (!Dispatcher::InitWithChannel(delegate, peer_pid, channel_handle, |
169 is_client)) | 169 is_client)) |
170 return false; | 170 return false; |
171 plugin_delegate_ = delegate; | 171 plugin_delegate_ = delegate; |
172 plugin_dispatcher_id_ = plugin_delegate_->Register(this); | 172 plugin_dispatcher_id_ = plugin_delegate_->Register(this); |
173 | 173 |
174 sync_filter_ = new IPC::SyncMessageFilter(delegate->GetShutdownEvent()); | 174 sync_filter_ = channel()->CreateSyncMessageFilter(); |
175 channel()->AddFilter(sync_filter_.get()); | |
176 | 175 |
177 // The message filter will intercept and process certain messages directly | 176 // The message filter will intercept and process certain messages directly |
178 // on the I/O thread. | 177 // on the I/O thread. |
179 channel()->AddFilter( | 178 channel()->AddFilter( |
180 new PluginMessageFilter( | 179 new PluginMessageFilter( |
181 delegate->GetGloballySeenInstanceIDSet(), | 180 delegate->GetGloballySeenInstanceIDSet(), |
182 PluginGlobals::Get()->resource_reply_thread_registrar())); | 181 PluginGlobals::Get()->resource_reply_thread_registrar())); |
183 return true; | 182 return true; |
184 } | 183 } |
185 | 184 |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
339 // once they're set. The user will have to restart to get new font prefs | 338 // once they're set. The user will have to restart to get new font prefs |
340 // propogated to plugins. | 339 // propogated to plugins. |
341 if (!received_preferences_) { | 340 if (!received_preferences_) { |
342 received_preferences_ = true; | 341 received_preferences_ = true; |
343 preferences_ = prefs; | 342 preferences_ = prefs; |
344 } | 343 } |
345 } | 344 } |
346 | 345 |
347 } // namespace proxy | 346 } // namespace proxy |
348 } // namespace ppapi | 347 } // namespace ppapi |
OLD | NEW |