| 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_instance_impl.h" | 5 #include "content/renderer/pepper/pepper_plugin_instance_impl.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/callback_helpers.h" | 8 #include "base/callback_helpers.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
| (...skipping 2652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2663 bool PepperPluginInstanceImpl::IsValidInstanceOf(PluginModule* module) { | 2663 bool PepperPluginInstanceImpl::IsValidInstanceOf(PluginModule* module) { |
| 2664 DCHECK(module); | 2664 DCHECK(module); |
| 2665 return module == module_.get() || | 2665 return module == module_.get() || |
| 2666 module == original_module_.get(); | 2666 module == original_module_.get(); |
| 2667 } | 2667 } |
| 2668 | 2668 |
| 2669 NPP PepperPluginInstanceImpl::instanceNPP() { | 2669 NPP PepperPluginInstanceImpl::instanceNPP() { |
| 2670 return npp_.get(); | 2670 return npp_.get(); |
| 2671 } | 2671 } |
| 2672 | 2672 |
| 2673 v8::Isolate* PepperPluginInstanceImpl::GetIsolate() const { | |
| 2674 return isolate_; | |
| 2675 } | |
| 2676 | |
| 2677 PepperPluginInstance* PepperPluginInstance::Get(PP_Instance instance_id) { | 2673 PepperPluginInstance* PepperPluginInstance::Get(PP_Instance instance_id) { |
| 2678 return HostGlobals::Get()->GetInstance(instance_id); | 2674 return HostGlobals::Get()->GetInstance(instance_id); |
| 2679 } | 2675 } |
| 2680 | 2676 |
| 2681 RenderView* PepperPluginInstanceImpl::GetRenderView() { | 2677 RenderView* PepperPluginInstanceImpl::GetRenderView() { |
| 2682 return render_view_; | 2678 return render_view_; |
| 2683 } | 2679 } |
| 2684 | 2680 |
| 2685 WebKit::WebPluginContainer* PepperPluginInstanceImpl::GetContainer() { | 2681 WebKit::WebPluginContainer* PepperPluginInstanceImpl::GetContainer() { |
| 2686 return container_; | 2682 return container_; |
| 2687 } | 2683 } |
| 2688 | 2684 |
| 2685 v8::Isolate* PepperPluginInstanceImpl::GetIsolate() const { |
| 2686 return isolate_; |
| 2687 } |
| 2688 |
| 2689 ppapi::VarTracker* PepperPluginInstanceImpl::GetVarTracker() { | 2689 ppapi::VarTracker* PepperPluginInstanceImpl::GetVarTracker() { |
| 2690 return HostGlobals::Get()->GetVarTracker(); | 2690 return HostGlobals::Get()->GetVarTracker(); |
| 2691 } | 2691 } |
| 2692 | 2692 |
| 2693 const GURL& PepperPluginInstanceImpl::GetPluginURL() { | 2693 const GURL& PepperPluginInstanceImpl::GetPluginURL() { |
| 2694 return plugin_url_; | 2694 return plugin_url_; |
| 2695 } | 2695 } |
| 2696 | 2696 |
| 2697 base::FilePath PepperPluginInstanceImpl::GetModulePath() { | 2697 base::FilePath PepperPluginInstanceImpl::GetModulePath() { |
| 2698 return module_->path(); | 2698 return module_->path(); |
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3000 // Running out-of-process. Initiate an IPC call to notify the plugin | 3000 // Running out-of-process. Initiate an IPC call to notify the plugin |
| 3001 // process. | 3001 // process. |
| 3002 ppapi::proxy::HostDispatcher* dispatcher = | 3002 ppapi::proxy::HostDispatcher* dispatcher = |
| 3003 ppapi::proxy::HostDispatcher::GetForInstance(pp_instance()); | 3003 ppapi::proxy::HostDispatcher::GetForInstance(pp_instance()); |
| 3004 dispatcher->Send(new PpapiMsg_PPPInstance_HandleDocumentLoad( | 3004 dispatcher->Send(new PpapiMsg_PPPInstance_HandleDocumentLoad( |
| 3005 ppapi::API_ID_PPP_INSTANCE, pp_instance(), pending_host_id, data)); | 3005 ppapi::API_ID_PPP_INSTANCE, pp_instance(), pending_host_id, data)); |
| 3006 } | 3006 } |
| 3007 } | 3007 } |
| 3008 | 3008 |
| 3009 } // namespace content | 3009 } // namespace content |
| OLD | NEW |