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 3157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3168 if (lock_target_.get()) { | 3168 if (lock_target_.get()) { |
3169 GetMouseLockDispatcher()->OnLockTargetDestroyed(lock_target_.get()); | 3169 GetMouseLockDispatcher()->OnLockTargetDestroyed(lock_target_.get()); |
3170 lock_target_.reset(); | 3170 lock_target_.reset(); |
3171 } | 3171 } |
3172 } | 3172 } |
3173 | 3173 |
3174 void PepperPluginInstanceImpl::DidDataFromWebURLResponse( | 3174 void PepperPluginInstanceImpl::DidDataFromWebURLResponse( |
3175 const blink::WebURLResponse& response, | 3175 const blink::WebURLResponse& response, |
3176 int pending_host_id, | 3176 int pending_host_id, |
3177 const ppapi::URLResponseInfoData& data) { | 3177 const ppapi::URLResponseInfoData& data) { |
| 3178 if (is_deleted_) |
| 3179 return; |
| 3180 |
3178 RendererPpapiHostImpl* host_impl = module_->renderer_ppapi_host(); | 3181 RendererPpapiHostImpl* host_impl = module_->renderer_ppapi_host(); |
3179 | 3182 |
3180 if (host_impl->in_process_router()) { | 3183 if (host_impl->in_process_router()) { |
3181 // Running in-process, we can just create the resource and call the | 3184 // Running in-process, we can just create the resource and call the |
3182 // PPP_Instance function directly. | 3185 // PPP_Instance function directly. |
3183 scoped_refptr<ppapi::proxy::URLLoaderResource> loader_resource( | 3186 scoped_refptr<ppapi::proxy::URLLoaderResource> loader_resource( |
3184 new ppapi::proxy::URLLoaderResource( | 3187 new ppapi::proxy::URLLoaderResource( |
3185 host_impl->in_process_router()->GetPluginConnection(pp_instance()), | 3188 host_impl->in_process_router()->GetPluginConnection(pp_instance()), |
3186 pp_instance(), | 3189 pp_instance(), |
3187 pending_host_id, | 3190 pending_host_id, |
(...skipping 11 matching lines...) Expand all Loading... |
3199 // Running out-of-process. Initiate an IPC call to notify the plugin | 3202 // Running out-of-process. Initiate an IPC call to notify the plugin |
3200 // process. | 3203 // process. |
3201 ppapi::proxy::HostDispatcher* dispatcher = | 3204 ppapi::proxy::HostDispatcher* dispatcher = |
3202 ppapi::proxy::HostDispatcher::GetForInstance(pp_instance()); | 3205 ppapi::proxy::HostDispatcher::GetForInstance(pp_instance()); |
3203 dispatcher->Send(new PpapiMsg_PPPInstance_HandleDocumentLoad( | 3206 dispatcher->Send(new PpapiMsg_PPPInstance_HandleDocumentLoad( |
3204 ppapi::API_ID_PPP_INSTANCE, pp_instance(), pending_host_id, data)); | 3207 ppapi::API_ID_PPP_INSTANCE, pp_instance(), pending_host_id, data)); |
3205 } | 3208 } |
3206 } | 3209 } |
3207 | 3210 |
3208 } // namespace content | 3211 } // namespace content |
OLD | NEW |