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 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
482 | 482 |
483 if (lock_mouse_callback_) | 483 if (lock_mouse_callback_) |
484 TrackedCallback::ClearAndAbort(&lock_mouse_callback_); | 484 TrackedCallback::ClearAndAbort(&lock_mouse_callback_); |
485 | 485 |
486 delegate_->InstanceDeleted(this); | 486 delegate_->InstanceDeleted(this); |
487 module_->InstanceDeleted(this); | 487 module_->InstanceDeleted(this); |
488 // If we switched from the NaCl plugin module, notify it too. | 488 // If we switched from the NaCl plugin module, notify it too. |
489 if (original_module_.get()) | 489 if (original_module_.get()) |
490 original_module_->InstanceDeleted(this); | 490 original_module_->InstanceDeleted(this); |
491 | 491 |
| 492 // This should be last since some of the above "instance deleted" calls will |
| 493 // want to look up in the global map to get info off of our object. |
492 HostGlobals::Get()->InstanceDeleted(pp_instance_); | 494 HostGlobals::Get()->InstanceDeleted(pp_instance_); |
493 } | 495 } |
494 | 496 |
495 // NOTE: Any of these methods that calls into the plugin needs to take into | 497 // NOTE: Any of these methods that calls into the plugin needs to take into |
496 // account that the plugin may use Var to remove the <embed> from the DOM, which | 498 // account that the plugin may use Var to remove the <embed> from the DOM, which |
497 // will make the WebPluginImpl drop its reference, usually the last one. If a | 499 // will make the WebPluginImpl drop its reference, usually the last one. If a |
498 // method needs to access a member of the instance after the call has returned, | 500 // method needs to access a member of the instance after the call has returned, |
499 // then it needs to keep its own reference on the stack. | 501 // then it needs to keep its own reference on the stack. |
500 | 502 |
501 void PluginInstance::Delete() { | 503 void PluginInstance::Delete() { |
(...skipping 2181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2683 screen_size_for_fullscreen_ = gfx::Size(); | 2685 screen_size_for_fullscreen_ = gfx::Size(); |
2684 WebElement element = container_->element(); | 2686 WebElement element = container_->element(); |
2685 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_); | 2687 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_); |
2686 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_); | 2688 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_); |
2687 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_); | 2689 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_); |
2688 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_); | 2690 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_); |
2689 } | 2691 } |
2690 | 2692 |
2691 } // namespace ppapi | 2693 } // namespace ppapi |
2692 } // namespace webkit | 2694 } // namespace webkit |
OLD | NEW |