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

Side by Side Diff: content/browser/frame_host/render_widget_host_view_guest.cc

Issue 139983009: ui::LocatedEvent location() returns gfx::PointF (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Undo accidental change. Created 6 years, 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "base/bind_helpers.h" 5 #include "base/bind_helpers.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "content/browser/browser_plugin/browser_plugin_guest.h" 9 #include "content/browser/browser_plugin/browser_plugin_guest.h"
10 #include "content/browser/frame_host/render_widget_host_view_guest.h" 10 #include "content/browser/frame_host/render_widget_host_view_guest.h"
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 return false; 529 return false;
530 530
531 if ((gesture->type() == ui::ET_GESTURE_PINCH_BEGIN || 531 if ((gesture->type() == ui::ET_GESTURE_PINCH_BEGIN ||
532 gesture->type() == ui::ET_GESTURE_PINCH_UPDATE || 532 gesture->type() == ui::ET_GESTURE_PINCH_UPDATE ||
533 gesture->type() == ui::ET_GESTURE_PINCH_END) && !pinch_zoom_enabled_) { 533 gesture->type() == ui::ET_GESTURE_PINCH_END) && !pinch_zoom_enabled_) {
534 return true; 534 return true;
535 } 535 }
536 536
537 blink::WebGestureEvent web_gesture = 537 blink::WebGestureEvent web_gesture =
538 MakeWebGestureEventFromUIEvent(*gesture); 538 MakeWebGestureEventFromUIEvent(*gesture);
539 const gfx::Point& client_point = gesture->location(); 539 const gfx::Point& client_point = gfx::ToFlooredPoint(gesture->location());
540 const gfx::Point& screen_point = gesture->location(); 540 const gfx::Point& screen_point = gfx::ToFlooredPoint(gesture->location());
541 541
542 web_gesture.x = client_point.x(); 542 web_gesture.x = client_point.x();
543 web_gesture.y = client_point.y(); 543 web_gesture.y = client_point.y();
544 web_gesture.globalX = screen_point.x(); 544 web_gesture.globalX = screen_point.x();
545 web_gesture.globalY = screen_point.y(); 545 web_gesture.globalY = screen_point.y();
546 546
547 if (web_gesture.type == blink::WebGestureEvent::Undefined) 547 if (web_gesture.type == blink::WebGestureEvent::Undefined)
548 return false; 548 return false;
549 if (web_gesture.type == blink::WebGestureEvent::GestureTapDown) { 549 if (web_gesture.type == blink::WebGestureEvent::GestureTapDown) {
550 host_->ForwardGestureEvent( 550 host_->ForwardGestureEvent(
(...skipping 15 matching lines...) Expand all
566 ++g_it) { 566 ++g_it) {
567 ForwardGestureEventToRenderer(*g_it); 567 ForwardGestureEventToRenderer(*g_it);
568 } 568 }
569 } 569 }
570 570
571 SkBitmap::Config RenderWidgetHostViewGuest::PreferredReadbackFormat() { 571 SkBitmap::Config RenderWidgetHostViewGuest::PreferredReadbackFormat() {
572 return SkBitmap::kARGB_8888_Config; 572 return SkBitmap::kARGB_8888_Config;
573 } 573 }
574 574
575 } // namespace content 575 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698