Chromium Code Reviews| 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/location.h" | 9 #include "base/location.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 1062 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1073 | 1073 |
| 1074 bool PepperPluginInstanceImpl::HandleInputEvent( | 1074 bool PepperPluginInstanceImpl::HandleInputEvent( |
| 1075 const blink::WebInputEvent& event, | 1075 const blink::WebInputEvent& event, |
| 1076 WebCursorInfo* cursor_info) { | 1076 WebCursorInfo* cursor_info) { |
| 1077 TRACE_EVENT0("ppapi", "PepperPluginInstanceImpl::HandleInputEvent"); | 1077 TRACE_EVENT0("ppapi", "PepperPluginInstanceImpl::HandleInputEvent"); |
| 1078 | 1078 |
| 1079 if (!has_been_clicked_ && is_flash_plugin_ && | 1079 if (!has_been_clicked_ && is_flash_plugin_ && |
| 1080 event.type == blink::WebInputEvent::MouseDown && | 1080 event.type == blink::WebInputEvent::MouseDown && |
| 1081 (event.modifiers & blink::WebInputEvent::LeftButtonDown)) { | 1081 (event.modifiers & blink::WebInputEvent::LeftButtonDown)) { |
| 1082 has_been_clicked_ = true; | 1082 has_been_clicked_ = true; |
| 1083 blink::WebRect bounds = container()->element().boundsInViewportSpace(); | 1083 blink::WebRect bounds = container()->element().boundsInViewport(); |
| 1084 RecordFlashClickSizeMetric(bounds.width, bounds.height); | 1084 RecordFlashClickSizeMetric(bounds.width, bounds.height); |
|
oshima
2015/11/23 22:14:50
tommycli@, the API used to return pre-page-scaled
| |
| 1085 } | 1085 } |
| 1086 | 1086 |
| 1087 if (throttler_ && throttler_->ConsumeInputEvent(event)) | 1087 if (throttler_ && throttler_->ConsumeInputEvent(event)) |
| 1088 return true; | 1088 return true; |
| 1089 | 1089 |
| 1090 if (!render_frame_) | 1090 if (!render_frame_) |
| 1091 return false; | 1091 return false; |
| 1092 if (WebInputEvent::isMouseEventType(event.type)) { | 1092 if (WebInputEvent::isMouseEventType(event.type)) { |
| 1093 render_frame_->PepperDidReceiveMouseEvent(this); | 1093 render_frame_->PepperDidReceiveMouseEvent(this); |
| 1094 } | 1094 } |
| (...skipping 2183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3278 | 3278 |
| 3279 void PepperPluginInstanceImpl::RecordFlashJavaScriptUse() { | 3279 void PepperPluginInstanceImpl::RecordFlashJavaScriptUse() { |
| 3280 if (initialized_ && !javascript_used_ && is_flash_plugin_) { | 3280 if (initialized_ && !javascript_used_ && is_flash_plugin_) { |
| 3281 javascript_used_ = true; | 3281 javascript_used_ = true; |
| 3282 RenderThread::Get()->RecordAction( | 3282 RenderThread::Get()->RecordAction( |
| 3283 base::UserMetricsAction("Flash.JavaScriptUsed")); | 3283 base::UserMetricsAction("Flash.JavaScriptUsed")); |
| 3284 } | 3284 } |
| 3285 } | 3285 } |
| 3286 | 3286 |
| 3287 } // namespace content | 3287 } // namespace content |
| OLD | NEW |