Chromium Code Reviews| 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 "content/renderer/pepper/pepper_plugin_delegate_impl.h" | 5 #include "content/renderer/pepper/pepper_plugin_delegate_impl.h" |
| 6 | 6 |
| 7 #include <cmath> | 7 #include <cmath> |
| 8 #include <cstddef> | 8 #include <cstddef> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <queue> | 10 #include <queue> |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 260 channel_handle, | 260 channel_handle, |
| 261 module->pp_module(), | 261 module->pp_module(), |
| 262 webkit::ppapi::PluginModule::GetLocalGetInterfaceFunc(), | 262 webkit::ppapi::PluginModule::GetLocalGetInterfaceFunc(), |
| 263 GetPreferences(), | 263 GetPreferences(), |
| 264 hung_filter.get())) | 264 hung_filter.get())) |
| 265 return scoped_refptr<webkit::ppapi::PluginModule>(); | 265 return scoped_refptr<webkit::ppapi::PluginModule>(); |
| 266 module->InitAsProxied(dispatcher.release()); | 266 module->InitAsProxied(dispatcher.release()); |
| 267 return module; | 267 return module; |
| 268 } | 268 } |
| 269 | 269 |
| 270 void PepperPluginDelegateImpl::CreatePepperHostDispatcher( | |
| 271 const FilePath& plugin_path, | |
| 272 int plugin_child_id, | |
| 273 base::ProcessHandle plugin_process_handle, | |
| 274 const IPC::ChannelHandle& channel_handle) { | |
| 275 webkit::ppapi::PluginModule* module = | |
| 276 PepperPluginRegistry::GetInstance()->GetLiveModule(plugin_path); | |
| 277 scoped_refptr<PepperHungPluginFilter> hung_filter( | |
| 278 new PepperHungPluginFilter(plugin_path, render_view_->routing_id(), | |
| 279 plugin_child_id)); | |
| 280 scoped_ptr<HostDispatcherWrapper> dispatcher(new HostDispatcherWrapper); | |
| 281 if (dispatcher->Init( | |
| 282 plugin_process_handle, | |
|
dmichael (off chromium)
2012/05/10 19:38:58
nit: I think the indent is off by 1
bbudge
2012/05/11 01:21:16
Done.
| |
| 283 channel_handle.name, | |
| 284 module->pp_module(), | |
| 285 webkit::ppapi::PluginModule::GetLocalGetInterfaceFunc(), | |
| 286 GetPreferences(), | |
| 287 hung_filter.get())) { | |
| 288 module->InitAsProxied(dispatcher.release()); | |
| 289 } | |
| 290 } | |
| 291 | |
| 270 scoped_refptr<PepperBrokerImpl> PepperPluginDelegateImpl::CreateBroker( | 292 scoped_refptr<PepperBrokerImpl> PepperPluginDelegateImpl::CreateBroker( |
| 271 webkit::ppapi::PluginModule* plugin_module) { | 293 webkit::ppapi::PluginModule* plugin_module) { |
| 272 DCHECK(plugin_module); | 294 DCHECK(plugin_module); |
| 273 DCHECK(!plugin_module->GetBroker()); | 295 DCHECK(!plugin_module->GetBroker()); |
| 274 | 296 |
| 275 // The broker path is the same as the plugin. | 297 // The broker path is the same as the plugin. |
| 276 const FilePath& broker_path = plugin_module->path(); | 298 const FilePath& broker_path = plugin_module->path(); |
| 277 | 299 |
| 278 scoped_refptr<PepperBrokerImpl> broker = | 300 scoped_refptr<PepperBrokerImpl> broker = |
| 279 new PepperBrokerImpl(plugin_module, this); | 301 new PepperBrokerImpl(plugin_module, this); |
| (...skipping 1359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1639 mouse_lock_instances_.erase(it); | 1661 mouse_lock_instances_.erase(it); |
| 1640 } | 1662 } |
| 1641 } | 1663 } |
| 1642 | 1664 |
| 1643 webkit_glue::ClipboardClient* | 1665 webkit_glue::ClipboardClient* |
| 1644 PepperPluginDelegateImpl::CreateClipboardClient() const { | 1666 PepperPluginDelegateImpl::CreateClipboardClient() const { |
| 1645 return new RendererClipboardClient; | 1667 return new RendererClipboardClient; |
| 1646 } | 1668 } |
| 1647 | 1669 |
| 1648 } // namespace content | 1670 } // namespace content |
| OLD | NEW |