| 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 798 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 809 if (is_flash_plugin_ && RenderThread::Get()) { | 809 if (is_flash_plugin_ && RenderThread::Get()) { |
| 810 RenderThread::Get()->RecordAction( | 810 RenderThread::Get()->RecordAction( |
| 811 base::UserMetricsAction("Flash.PluginInstanceCreated")); | 811 base::UserMetricsAction("Flash.PluginInstanceCreated")); |
| 812 blink::WebRect bounds = container()->element().boundsInViewportSpace(); | 812 blink::WebRect bounds = container()->element().boundsInViewportSpace(); |
| 813 RecordFlashSizeMetric(bounds.width, bounds.height); | 813 RecordFlashSizeMetric(bounds.width, bounds.height); |
| 814 } | 814 } |
| 815 | 815 |
| 816 if (throttler) { | 816 if (throttler) { |
| 817 throttler_ = throttler.Pass(); | 817 throttler_ = throttler.Pass(); |
| 818 throttler_->AddObserver(this); | 818 throttler_->AddObserver(this); |
| 819 throttler_->Initialize(render_frame_, plugin_url_.GetOrigin(), |
| 820 module()->name(), |
| 821 container()->element().boundsInViewportSpace()); |
| 819 } | 822 } |
| 820 | 823 |
| 821 message_channel_ = MessageChannel::Create(this, &message_channel_object_); | 824 message_channel_ = MessageChannel::Create(this, &message_channel_object_); |
| 822 | 825 |
| 823 full_frame_ = full_frame; | 826 full_frame_ = full_frame; |
| 824 | 827 |
| 825 UpdateTouchEventRequest(); | 828 UpdateTouchEventRequest(); |
| 826 container_->setWantsWheelEvents(IsAcceptingWheelEvents()); | 829 container_->setWantsWheelEvents(IsAcceptingWheelEvents()); |
| 827 | 830 |
| 828 SetGPUHistogram(ppapi::Preferences(PpapiPreferencesBuilder::Build( | 831 SetGPUHistogram(ppapi::Preferences(PpapiPreferencesBuilder::Build( |
| (...skipping 2460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3289 | 3292 |
| 3290 void PepperPluginInstanceImpl::RecordFlashJavaScriptUse() { | 3293 void PepperPluginInstanceImpl::RecordFlashJavaScriptUse() { |
| 3291 if (initialized_ && !javascript_used_ && is_flash_plugin_) { | 3294 if (initialized_ && !javascript_used_ && is_flash_plugin_) { |
| 3292 javascript_used_ = true; | 3295 javascript_used_ = true; |
| 3293 RenderThread::Get()->RecordAction( | 3296 RenderThread::Get()->RecordAction( |
| 3294 base::UserMetricsAction("Flash.JavaScriptUsed")); | 3297 base::UserMetricsAction("Flash.JavaScriptUsed")); |
| 3295 } | 3298 } |
| 3296 } | 3299 } |
| 3297 | 3300 |
| 3298 } // namespace content | 3301 } // namespace content |
| OLD | NEW |