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

Unified Diff: content/browser/renderer_host/input/input_router_impl.cc

Issue 634313002: Add mouse input forwarding to gpu service (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/input/input_router_impl.cc
diff --git a/content/browser/renderer_host/input/input_router_impl.cc b/content/browser/renderer_host/input/input_router_impl.cc
index 441f9384bb8745e05efd53d9e1e645aa94255124..813b4e42b8138a19c018cfc43db01df96319aacb 100644
--- a/content/browser/renderer_host/input/input_router_impl.cc
+++ b/content/browser/renderer_host/input/input_router_impl.cc
@@ -10,6 +10,7 @@
#include "base/command_line.h"
#include "base/metrics/histogram.h"
#include "base/strings/string_number_conversions.h"
+#include "content/browser/gpu/gpu_process_host_ui_shim.h"
#include "content/browser/renderer_host/input/gesture_event_queue.h"
#include "content/browser/renderer_host/input/input_ack_handler.h"
#include "content/browser/renderer_host/input/input_router_client.h"
@@ -17,6 +18,7 @@
#include "content/browser/renderer_host/input/touchpad_tap_suppression_controller.h"
#include "content/common/content_constants_internal.h"
#include "content/common/edit_command.h"
+#include "content/common/gpu/gpu_messages.h"
#include "content/common/input/input_event_ack_state.h"
#include "content/common/input/touch_action.h"
#include "content/common/input/web_touch_event_traits.h"
@@ -344,9 +346,12 @@ void InputRouterImpl::OfferToHandlers(const WebInputEvent& input_event,
bool is_keyboard_shortcut) {
output_stream_validator_.Validate(input_event);
+ LOG(WARNING) << "InputRouterImpl::OfferToHandlers";
+
if (OfferToClient(input_event, latency_info))
return;
+ OfferToGpuService(input_event, is_keyboard_shortcut);
OfferToRenderer(input_event, latency_info, is_keyboard_shortcut);
// Touch events should always indicate in the event whether they are
@@ -409,6 +414,14 @@ bool InputRouterImpl::OfferToRenderer(const WebInputEvent& input_event,
return false;
}
+bool InputRouterImpl::OfferToGpuService(const blink::WebInputEvent& input_event,
+ bool is_keyboard_shortcut) {
+ GpuProcessHostUIShim* shim = GpuProcessHostUIShim::GetOneInstance();
+ return (shim &&
+ shim->Send(
+ new GpuMsg_HandleInputEvent(&input_event, is_keyboard_shortcut)));
+}
+
void InputRouterImpl::SendSyntheticWheelEventForPinch(
const GestureEventWithLatencyInfo& pinch_event) {
// We match typical trackpad behavior on Windows by sending fake wheel events

Powered by Google App Engine
This is Rietveld 408576698