Chromium Code Reviews| Index: content/browser/renderer_host/render_widget_host_view_win.cc |
| diff --git a/content/browser/renderer_host/render_widget_host_view_win.cc b/content/browser/renderer_host/render_widget_host_view_win.cc |
| index cad5c9b7823503b95a83ae3d4bd3e8ddd61e3309..fe10c6ae129c5b40a6ed242dbdd16721bac273b6 100644 |
| --- a/content/browser/renderer_host/render_widget_host_view_win.cc |
| +++ b/content/browser/renderer_host/render_widget_host_view_win.cc |
| @@ -57,6 +57,7 @@ |
| #include "ui/gfx/gdi_util.h" |
| #include "ui/gfx/rect.h" |
| #include "ui/gfx/screen.h" |
| +#include "ui/views/events/event.h" |
| #include "webkit/glue/webaccessibility.h" |
| #include "webkit/glue/webcursor.h" |
| #include "webkit/plugins/npapi/plugin_constants_win.h" |
| @@ -333,6 +334,8 @@ RenderWidgetHostViewWin::RenderWidgetHostViewWin(RenderWidgetHost* widget) |
| focus_on_editable_field_(false), |
| received_focus_change_after_pointer_down_(false), |
| touch_events_enabled_(false), |
| + ALLOW_THIS_IN_INITIALIZER_LIST( |
| + gesture_recognizer_(ui::GestureRecognizer::Create(this))), |
|
sky
2012/05/03 22:39:19
If gesture_recognizer_ is going to created in the
|
| ALLOW_THIS_IN_INITIALIZER_LIST(sys_color_change_listener_(this)) { |
| render_widget_host_->SetView(this); |
| registrar_.Add(this, |
| @@ -1000,6 +1003,39 @@ void RenderWidgetHostViewWin::SetScrollOffsetPinning( |
| bool is_pinned_to_left, bool is_pinned_to_right) { |
| } |
| +bool RenderWidgetHostViewWin::DispatchLongPressGestureEvent( |
| + ui::GestureEvent* event) { |
| + // TODO: Implement. |
| + return false; |
| +} |
| + |
| +bool RenderWidgetHostViewWin::DispatchCancelTouchEvent( |
| + ui::TouchEvent* event) { |
| + // TODO: Implement. |
| + return false; |
| +} |
| + |
| +ui::TouchEvent* RenderWidgetHostViewWin::CreateTouchEvent( |
| + ui::EventType type, |
| + const gfx::Point& location, |
| + int touch_id, |
| + base::TimeDelta time_stamp) { |
| + return new views::TouchEvent( |
| + type, location.x(), location.y(), 0, touch_id, 0, 0, 0, 0); |
| +} |
| + |
| +ui::GestureEvent* RenderWidgetHostViewWin::CreateGestureEvent( |
| + ui::EventType type, |
| + const gfx::Point& location, |
| + int flags, |
| + const base::Time time, |
| + float param_first, |
| + float param_second, |
| + unsigned int touch_id_bitfield) { |
| + return new views::GestureEvent(type, location.x(), location.y(), flags, time, |
| + param_first, param_second, touch_id_bitfield); |
| +} |
| + |
| /////////////////////////////////////////////////////////////////////////////// |
| // RenderWidgetHostViewWin, private: |