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

Side by Side Diff: content/renderer/pepper/pepper_plugin_instance_impl.cc

Issue 1516723003: [Element / Autofill] Add boundsInViewportFloat() to fix <input> popup misalignment. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Refator to use boundsInViewportFloat() eventually, but keep boundsInViewportInt(). Created 5 years 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
« no previous file with comments | « content/public/renderer/render_view.h ('k') | content/renderer/render_view_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 "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 1061 matching lines...) Expand 10 before | Expand all | Expand 10 after
1072 1072
1073 bool PepperPluginInstanceImpl::HandleInputEvent( 1073 bool PepperPluginInstanceImpl::HandleInputEvent(
1074 const blink::WebInputEvent& event, 1074 const blink::WebInputEvent& event,
1075 WebCursorInfo* cursor_info) { 1075 WebCursorInfo* cursor_info) {
1076 TRACE_EVENT0("ppapi", "PepperPluginInstanceImpl::HandleInputEvent"); 1076 TRACE_EVENT0("ppapi", "PepperPluginInstanceImpl::HandleInputEvent");
1077 1077
1078 if (!has_been_clicked_ && is_flash_plugin_ && 1078 if (!has_been_clicked_ && is_flash_plugin_ &&
1079 event.type == blink::WebInputEvent::MouseDown && 1079 event.type == blink::WebInputEvent::MouseDown &&
1080 (event.modifiers & blink::WebInputEvent::LeftButtonDown)) { 1080 (event.modifiers & blink::WebInputEvent::LeftButtonDown)) {
1081 has_been_clicked_ = true; 1081 has_been_clicked_ = true;
1082 blink::WebRect bounds = container()->element().boundsInViewport(); 1082 blink::WebRect bounds = container()->element().boundsInViewportInt();
1083 RecordFlashClickSizeMetric(bounds.width, bounds.height); 1083 RecordFlashClickSizeMetric(bounds.width, bounds.height);
1084 } 1084 }
1085 1085
1086 if (throttler_ && throttler_->ConsumeInputEvent(event)) 1086 if (throttler_ && throttler_->ConsumeInputEvent(event))
1087 return true; 1087 return true;
1088 1088
1089 if (!render_frame_) 1089 if (!render_frame_)
1090 return false; 1090 return false;
1091 if (WebInputEvent::isMouseEventType(event.type)) { 1091 if (WebInputEvent::isMouseEventType(event.type)) {
1092 render_frame_->PepperDidReceiveMouseEvent(this); 1092 render_frame_->PepperDidReceiveMouseEvent(this);
(...skipping 2181 matching lines...) Expand 10 before | Expand all | Expand 10 after
3274 3274
3275 void PepperPluginInstanceImpl::RecordFlashJavaScriptUse() { 3275 void PepperPluginInstanceImpl::RecordFlashJavaScriptUse() {
3276 if (initialized_ && !javascript_used_ && is_flash_plugin_) { 3276 if (initialized_ && !javascript_used_ && is_flash_plugin_) {
3277 javascript_used_ = true; 3277 javascript_used_ = true;
3278 RenderThread::Get()->RecordAction( 3278 RenderThread::Get()->RecordAction(
3279 base::UserMetricsAction("Flash.JavaScriptUsed")); 3279 base::UserMetricsAction("Flash.JavaScriptUsed"));
3280 } 3280 }
3281 } 3281 }
3282 3282
3283 } // namespace content 3283 } // namespace content
OLDNEW
« no previous file with comments | « content/public/renderer/render_view.h ('k') | content/renderer/render_view_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698