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 |
702 // Force-unbind any Graphics. In the case of Graphics2D, if the plugin | 704 // Force-unbind any Graphics. In the case of Graphics2D, if the plugin |
703 // leaks the graphics 2D, it may actually get cleaned up after our | 705 // leaks the graphics 2D, it may actually get cleaned up after our |
704 // destruction, so we need its pointers to be up-to-date. | 706 // destruction, so we need its pointers to be up-to-date. |
705 BindGraphics(pp_instance(), 0); | 707 BindGraphics(pp_instance(), 0); |
706 container_ = NULL; | 708 container_ = NULL; |
707 } | 709 } |
708 | 710 |
709 bool PepperPluginInstanceImpl::is_deleted() const { return is_deleted_; } | 711 bool PepperPluginInstanceImpl::is_deleted() const { return is_deleted_; } |
710 | 712 |
711 void PepperPluginInstanceImpl::Paint(WebCanvas* canvas, | 713 void PepperPluginInstanceImpl::Paint(WebCanvas* canvas, |
(...skipping 2630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3342 | 3344 |
3343 void PepperPluginInstanceImpl::RecordFlashJavaScriptUse() { | 3345 void PepperPluginInstanceImpl::RecordFlashJavaScriptUse() { |
3344 if (initialized_ && !javascript_used_ && is_flash_plugin_) { | 3346 if (initialized_ && !javascript_used_ && is_flash_plugin_) { |
3345 javascript_used_ = true; | 3347 javascript_used_ = true; |
3346 RenderThread::Get()->RecordAction( | 3348 RenderThread::Get()->RecordAction( |
3347 base::UserMetricsAction("Flash.JavaScriptUsed")); | 3349 base::UserMetricsAction("Flash.JavaScriptUsed")); |
3348 } | 3350 } |
3349 } | 3351 } |
3350 | 3352 |
3351 } // namespace content | 3353 } // namespace content |
OLD | NEW |