Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(83)

Side by Side Diff: webkit/plugins/ppapi/ppapi_plugin_instance.cc

Issue 9564024: Re-land http://codereview.chromium.org/9403039/, r124106 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove unnecessary change to ppapi_uitest.cc timer_ Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/plugins/ppapi/npobject_var.h ('k') | webkit/plugins/ppapi/ppapi_webplugin_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 351
352 // NOTE: Any of these methods that calls into the plugin needs to take into 352 // NOTE: Any of these methods that calls into the plugin needs to take into
353 // account that the plugin may use Var to remove the <embed> from the DOM, which 353 // account that the plugin may use Var to remove the <embed> from the DOM, which
354 // will make the WebPluginImpl drop its reference, usually the last one. If a 354 // will make the WebPluginImpl drop its reference, usually the last one. If a
355 // method needs to access a member of the instance after the call has returned, 355 // method needs to access a member of the instance after the call has returned,
356 // then it needs to keep its own reference on the stack. 356 // then it needs to keep its own reference on the stack.
357 357
358 void PluginInstance::Delete() { 358 void PluginInstance::Delete() {
359 // Keep a reference on the stack. See NOTE above. 359 // Keep a reference on the stack. See NOTE above.
360 scoped_refptr<PluginInstance> ref(this); 360 scoped_refptr<PluginInstance> ref(this);
361 // Force the MessageChannel to release its "passthrough object" which should
362 // release our last reference to the "InstanceObject" and will probably
363 // destroy it. We want to do this prior to calling DidDestroy in case the
364 // destructor of the instance object tries to use the instance.
365 message_channel_->SetPassthroughObject(NULL);
361 instance_interface_->DidDestroy(pp_instance()); 366 instance_interface_->DidDestroy(pp_instance());
362 367
363 if (fullscreen_container_) { 368 if (fullscreen_container_) {
364 fullscreen_container_->Destroy(); 369 fullscreen_container_->Destroy();
365 fullscreen_container_ = NULL; 370 fullscreen_container_ = NULL;
366 } 371 }
367 container_ = NULL; 372 container_ = NULL;
368 } 373 }
369 374
370 void PluginInstance::Paint(WebCanvas* canvas, 375 void PluginInstance::Paint(WebCanvas* canvas,
(...skipping 1792 matching lines...) Expand 10 before | Expand all | Expand 10 after
2163 screen_size_for_fullscreen_ = gfx::Size(); 2168 screen_size_for_fullscreen_ = gfx::Size();
2164 WebElement element = container_->element(); 2169 WebElement element = container_->element();
2165 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_); 2170 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_);
2166 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_); 2171 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_);
2167 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_); 2172 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_);
2168 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_); 2173 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_);
2169 } 2174 }
2170 2175
2171 } // namespace ppapi 2176 } // namespace ppapi
2172 } // namespace webkit 2177 } // namespace webkit
OLDNEW
« no previous file with comments | « webkit/plugins/ppapi/npobject_var.h ('k') | webkit/plugins/ppapi/ppapi_webplugin_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698