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 "webkit/plugins/ppapi/ppapi_plugin_instance.h" | 5 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/memory/linked_ptr.h" | 10 #include "base/memory/linked_ptr.h" |
| (...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 395 // then it needs to keep its own reference on the stack. | 395 // then it needs to keep its own reference on the stack. |
| 396 | 396 |
| 397 void PluginInstance::Delete() { | 397 void PluginInstance::Delete() { |
| 398 // Keep a reference on the stack. See NOTE above. | 398 // Keep a reference on the stack. See NOTE above. |
| 399 scoped_refptr<PluginInstance> ref(this); | 399 scoped_refptr<PluginInstance> ref(this); |
| 400 // Force the MessageChannel to release its "passthrough object" which should | 400 // Force the MessageChannel to release its "passthrough object" which should |
| 401 // release our last reference to the "InstanceObject" and will probably | 401 // release our last reference to the "InstanceObject" and will probably |
| 402 // destroy it. We want to do this prior to calling DidDestroy in case the | 402 // destroy it. We want to do this prior to calling DidDestroy in case the |
| 403 // destructor of the instance object tries to use the instance. | 403 // destructor of the instance object tries to use the instance. |
| 404 message_channel_->SetPassthroughObject(NULL); | 404 message_channel_->SetPassthroughObject(NULL); |
| 405 instance_interface_->DidDestroy(pp_instance()); | 405 // If this is a NaCl plugin instance, allow the trusted NaCl plugin to start |
| 406 // its own shutdown before the untrusted plugin, which may hang. | |
| 406 if (nacl_plugin_instance_interface_.get()) | 407 if (nacl_plugin_instance_interface_.get()) |
| 407 nacl_plugin_instance_interface_->DidDestroy(pp_instance()); | 408 nacl_plugin_instance_interface_->DidDestroy(pp_instance()); |
|
dmichael (off chromium)
2012/08/08 22:28:52
This *should* kill the sel_ldr process where the n
| |
| 409 instance_interface_->DidDestroy(pp_instance()); | |
|
bbudge
2012/08/08 20:31:57
If this hangs, is there an issue about the code th
dmichael (off chromium)
2012/08/08 22:28:52
Hmm, it *is* a synchronous message. But if the pro
| |
| 408 | 410 |
| 409 if (fullscreen_container_) { | 411 if (fullscreen_container_) { |
| 410 fullscreen_container_->Destroy(); | 412 fullscreen_container_->Destroy(); |
| 411 fullscreen_container_ = NULL; | 413 fullscreen_container_ = NULL; |
| 412 } | 414 } |
| 413 container_ = NULL; | 415 container_ = NULL; |
| 414 } | 416 } |
| 415 | 417 |
| 416 void PluginInstance::Paint(WebCanvas* canvas, | 418 void PluginInstance::Paint(WebCanvas* canvas, |
| 417 const gfx::Rect& plugin_rect, | 419 const gfx::Rect& plugin_rect, |
| (...skipping 1830 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2248 screen_size_for_fullscreen_ = gfx::Size(); | 2250 screen_size_for_fullscreen_ = gfx::Size(); |
| 2249 WebElement element = container_->element(); | 2251 WebElement element = container_->element(); |
| 2250 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_); | 2252 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_); |
| 2251 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_); | 2253 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_); |
| 2252 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_); | 2254 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_); |
| 2253 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_); | 2255 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_); |
| 2254 } | 2256 } |
| 2255 | 2257 |
| 2256 } // namespace ppapi | 2258 } // namespace ppapi |
| 2257 } // namespace webkit | 2259 } // namespace webkit |
| OLD | NEW |