Chromium Code Reviews| Index: content/browser/renderer_host/render_widget_host_view_gtk.cc |
| diff --git a/content/browser/renderer_host/render_widget_host_view_gtk.cc b/content/browser/renderer_host/render_widget_host_view_gtk.cc |
| index 2a93cb7c979dd83c5949ffc6b0ebb23ff165e3c1..4e31fd622a0d5a667a2fb1b280d5a4ac48003f2c 100644 |
| --- a/content/browser/renderer_host/render_widget_host_view_gtk.cc |
| +++ b/content/browser/renderer_host/render_widget_host_view_gtk.cc |
| @@ -29,6 +29,7 @@ |
| #include "content/browser/renderer_host/gtk_im_context_wrapper.h" |
| #include "content/browser/renderer_host/gtk_key_bindings_handler.h" |
| #include "content/browser/renderer_host/gtk_window_utils.h" |
| +#include "content/browser/renderer_host/input/web_input_event_builders_gtk.h" |
| #include "content/browser/renderer_host/render_view_host_delegate.h" |
| #include "content/browser/renderer_host/render_view_host_impl.h" |
| #include "content/common/gpu/gpu_messages.h" |
| @@ -40,7 +41,6 @@ |
| #include "skia/ext/platform_canvas.h" |
| #include "third_party/WebKit/public/web/WebInputEvent.h" |
| #include "third_party/WebKit/public/web/WebScreenInfo.h" |
| -#include "third_party/WebKit/public/web/gtk/WebInputEventFactory.h" |
| #include "ui/base/clipboard/scoped_clipboard_writer.h" |
| #include "ui/base/gtk/gtk_compat.h" |
| #include "ui/base/text/text_elider.h" |
| @@ -50,7 +50,6 @@ |
| #include "ui/gfx/gtk_preserve_window.h" |
| #include "webkit/common/cursors/webcursor_gtk_data.h" |
| -using WebKit::WebInputEventFactory; |
| using WebKit::WebMouseWheelEvent; |
| using WebKit::WebScreenInfo; |
| @@ -70,7 +69,7 @@ namespace { |
| const int kMaxWindowWidth = 10000; |
| const int kMaxWindowHeight = 10000; |
| -// See WebInputEventFactor.cpp for a reason for this being the default |
| +// See WebInputEventFactory.cpp for a reason for this being the default |
| // scroll size for linux. |
| const float kDefaultScrollPixelsPerTick = 160.0f / 3.0f; |
|
jdduke (slow)
2013/09/16 15:31:55
Could we store this constant in a single location?
garykac
2013/09/16 22:45:05
WebMouseWheelEventBuilder seems like a reasonable
jdduke (slow)
2013/09/16 23:46:58
I see, I was thinking more so of the use here, and
|
| @@ -354,7 +353,7 @@ class RenderWidgetHostViewGtkWidget { |
| RenderWidgetHostImpl* widget_host = |
| RenderWidgetHostImpl::From(host_view->GetRenderWidgetHost()); |
| if (widget_host) |
| - widget_host->ForwardMouseEvent(WebInputEventFactory::mouseEvent(event)); |
| + widget_host->ForwardMouseEvent(WebMouseEventBuilder::Build(event)); |
| // Although we did handle the mouse event, we need to let other handlers |
| // run (in particular the one installed by WebContentsViewGtk). |
| @@ -380,8 +379,7 @@ class RenderWidgetHostViewGtkWidget { |
| host_view->ModifyEventForEdgeDragging(widget, event); |
| - WebKit::WebMouseEvent mouse_event = |
| - WebInputEventFactory::mouseEvent(event); |
| + WebKit::WebMouseEvent mouse_event = WebMouseEventBuilder::Build(event); |
| if (host_view->mouse_locked_) { |
| gfx::Point center = host_view->GetWidgetCenter(); |
| @@ -431,8 +429,7 @@ class RenderWidgetHostViewGtkWidget { |
| // additionally send this crossing event with the state indicating the |
| // button is down, it causes problems with drag and drop in WebKit.) |
| if (!(event->state & any_button_mask)) { |
| - WebKit::WebMouseEvent mouse_event = |
| - WebInputEventFactory::mouseEvent(event); |
| + WebKit::WebMouseEvent mouse_event = WebMouseEventBuilder::Build(event); |
| host_view->ModifyEventMovementAndCoords(&mouse_event); |
| // When crossing out and back into a render view the movement values |
| // must represent the instantaneous movement of the mouse, not the jump |
| @@ -518,7 +515,7 @@ class RenderWidgetHostViewGtkWidget { |
| event->direction = GDK_SCROLL_RIGHT; |
| } |
| - WebMouseWheelEvent web_event = WebInputEventFactory::mouseWheelEvent(event); |
| + WebMouseWheelEvent web_event = WebMouseWheelEventBuilder::Build(event); |
| // We peek ahead at the top of the queue to look for additional pending |
| // scroll events. |
| if (event->direction == GDK_SCROLL_UP || |