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

Side by Side Diff: content/browser/browser_plugin/browser_plugin_guest.cc

Issue 2782893002: WebMouseEvent coordinates are now fractional & private (Closed)
Patch Set: Fixed compile failures. Created 3 years, 8 months 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
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/browser/browser_plugin/browser_plugin_guest.h" 5 #include "content/browser/browser_plugin/browser_plugin_guest.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 // Mark the resend source with the browser plugin's instance id, so the 461 // Mark the resend source with the browser plugin's instance id, so the
462 // correct browser_plugin will know to ignore the event. 462 // correct browser_plugin will know to ignore the event.
463 resent_gesture_event.resendingPluginId = browser_plugin_instance_id_; 463 resent_gesture_event.resendingPluginId = browser_plugin_instance_id_;
464 ui::LatencyInfo latency_info = 464 ui::LatencyInfo latency_info =
465 ui::WebInputEventTraits::CreateLatencyInfoForWebGestureEvent( 465 ui::WebInputEventTraits::CreateLatencyInfoForWebGestureEvent(
466 resent_gesture_event); 466 resent_gesture_event);
467 view->ProcessGestureEvent(resent_gesture_event, latency_info); 467 view->ProcessGestureEvent(resent_gesture_event, latency_info);
468 } else if (event.type() == blink::WebInputEvent::MouseWheel) { 468 } else if (event.type() == blink::WebInputEvent::MouseWheel) {
469 blink::WebMouseWheelEvent resent_wheel_event; 469 blink::WebMouseWheelEvent resent_wheel_event;
470 memcpy(&resent_wheel_event, &event, sizeof(blink::WebMouseWheelEvent)); 470 memcpy(&resent_wheel_event, &event, sizeof(blink::WebMouseWheelEvent));
471 resent_wheel_event.x += offset_from_embedder.x(); 471 resent_wheel_event.position.x += offset_from_embedder.x();
472 resent_wheel_event.y += offset_from_embedder.y(); 472 resent_wheel_event.position.y += offset_from_embedder.y();
473 resent_wheel_event.resendingPluginId = browser_plugin_instance_id_; 473 resent_wheel_event.resendingPluginId = browser_plugin_instance_id_;
474 // TODO(wjmaclean): Initialize latency info correctly for OOPIFs. 474 // TODO(wjmaclean): Initialize latency info correctly for OOPIFs.
475 // https://crbug.com/613628 475 // https://crbug.com/613628
476 ui::LatencyInfo latency_info(ui::SourceEventType::WHEEL); 476 ui::LatencyInfo latency_info(ui::SourceEventType::WHEEL);
477 view->ProcessMouseWheelEvent(resent_wheel_event, latency_info); 477 view->ProcessMouseWheelEvent(resent_wheel_event, latency_info);
478 } else { 478 } else {
479 NOTIMPLEMENTED(); 479 NOTIMPLEMENTED();
480 } 480 }
481 } 481 }
482 482
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after
1061 range, character_bounds); 1061 range, character_bounds);
1062 } 1062 }
1063 #endif 1063 #endif
1064 1064
1065 void BrowserPluginGuest::SetContextMenuPosition(const gfx::Point& position) { 1065 void BrowserPluginGuest::SetContextMenuPosition(const gfx::Point& position) {
1066 if (delegate_) 1066 if (delegate_)
1067 delegate_->SetContextMenuPosition(position); 1067 delegate_->SetContextMenuPosition(position);
1068 } 1068 }
1069 1069
1070 } // namespace content 1070 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698