| 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/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/memory/linked_ptr.h" | 10 #include "base/memory/linked_ptr.h" |
| (...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 692 } | 692 } |
| 693 // Ensure we don't attempt to call functions on the destroyed instance. | 693 // Ensure we don't attempt to call functions on the destroyed instance. |
| 694 original_instance_interface_.reset(); | 694 original_instance_interface_.reset(); |
| 695 instance_interface_.reset(); | 695 instance_interface_.reset(); |
| 696 | 696 |
| 697 if (fullscreen_container_) { | 697 if (fullscreen_container_) { |
| 698 fullscreen_container_->Destroy(); | 698 fullscreen_container_->Destroy(); |
| 699 fullscreen_container_ = NULL; | 699 fullscreen_container_ = NULL; |
| 700 } | 700 } |
| 701 | 701 |
| 702 throttler_.reset(); | |
| 703 | |
| 704 // Force-unbind any Graphics. In the case of Graphics2D, if the plugin | 702 // Force-unbind any Graphics. In the case of Graphics2D, if the plugin |
| 705 // leaks the graphics 2D, it may actually get cleaned up after our | 703 // leaks the graphics 2D, it may actually get cleaned up after our |
| 706 // destruction, so we need its pointers to be up-to-date. | 704 // destruction, so we need its pointers to be up-to-date. |
| 707 BindGraphics(pp_instance(), 0); | 705 BindGraphics(pp_instance(), 0); |
| 708 container_ = NULL; | 706 container_ = NULL; |
| 709 } | 707 } |
| 710 | 708 |
| 711 bool PepperPluginInstanceImpl::is_deleted() const { return is_deleted_; } | 709 bool PepperPluginInstanceImpl::is_deleted() const { return is_deleted_; } |
| 712 | 710 |
| 713 void PepperPluginInstanceImpl::Paint(WebCanvas* canvas, | 711 void PepperPluginInstanceImpl::Paint(WebCanvas* canvas, |
| (...skipping 2630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3344 | 3342 |
| 3345 void PepperPluginInstanceImpl::RecordFlashJavaScriptUse() { | 3343 void PepperPluginInstanceImpl::RecordFlashJavaScriptUse() { |
| 3346 if (initialized_ && !javascript_used_ && is_flash_plugin_) { | 3344 if (initialized_ && !javascript_used_ && is_flash_plugin_) { |
| 3347 javascript_used_ = true; | 3345 javascript_used_ = true; |
| 3348 RenderThread::Get()->RecordAction( | 3346 RenderThread::Get()->RecordAction( |
| 3349 base::UserMetricsAction("Flash.JavaScriptUsed")); | 3347 base::UserMetricsAction("Flash.JavaScriptUsed")); |
| 3350 } | 3348 } |
| 3351 } | 3349 } |
| 3352 | 3350 |
| 3353 } // namespace content | 3351 } // namespace content |
| OLD | NEW |