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

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

Issue 628763003: Support InputRouter recycling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updates 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.h
diff --git a/content/browser/renderer_host/input/input_router_impl.h b/content/browser/renderer_host/input/input_router_impl.h
index 0f7b023bfd6fe3e7233a5bd23e43d3d33acf0cee..c513b04d5ad660a9e4b505980cadfa4ef42e7a32 100644
--- a/content/browser/renderer_host/input/input_router_impl.h
+++ b/content/browser/renderer_host/input/input_router_impl.h
@@ -15,7 +15,6 @@
#include "content/browser/renderer_host/input/touch_action_filter.h"
#include "content/browser/renderer_host/input/touch_event_queue.h"
#include "content/browser/renderer_host/input/touchpad_tap_suppression_controller.h"
-#include "content/common/input/input_event_stream_validator.h"
#include "content/public/browser/native_web_keyboard_event.h"
struct InputHostMsg_HandleInputEvent_ACK_Params;
@@ -31,6 +30,7 @@ struct LatencyInfo;
namespace content {
class InputAckHandler;
+class InputEventStreamValidator;
class InputRouterClient;
class OverscrollController;
struct DidOverscrollParams;
@@ -46,6 +46,7 @@ class CONTENT_EXPORT InputRouterImpl
Config();
GestureEventQueue::Config gesture_config;
TouchEventQueue::Config touch_config;
+ bool validate_event_stream;
};
InputRouterImpl(IPC::Sender* sender,
@@ -56,7 +57,6 @@ class CONTENT_EXPORT InputRouterImpl
virtual ~InputRouterImpl();
// InputRouter
- virtual void Flush() override;
virtual bool SendInput(scoped_ptr<IPC::Message> message) override;
virtual void SendMouseEvent(
const MouseEventWithLatencyInfo& mouse_event) override;
@@ -70,6 +70,8 @@ class CONTENT_EXPORT InputRouterImpl
const GestureEventWithLatencyInfo& gesture_event) override;
virtual void SendTouchEvent(
const TouchEventWithLatencyInfo& touch_event) override;
+ virtual void Recycle() override;
+ virtual void RequestFlushedNotification() override;
virtual const NativeWebKeyboardEvent* GetLastKeyboardEvent() const override;
virtual bool ShouldForwardTouchEvent() const override;
virtual void OnViewUpdated(int view_flags) override;
@@ -270,11 +272,17 @@ private:
// to the client_ after all events have been dispatched/acked.
bool flush_requested_;
+ // Whether we're in the scope of a |Recycle()| call. The only input events
+ // that should conceivably arrive when this is true are gesture events, which
+ // will be summarily dropped.
+ bool in_recycle_;
+
TouchEventQueue touch_event_queue_;
GestureEventQueue gesture_event_queue_;
TouchActionFilter touch_action_filter_;
- InputEventStreamValidator input_stream_validator_;
- InputEventStreamValidator output_stream_validator_;
+
+ scoped_ptr<InputEventStreamValidator> optional_input_stream_validator_;
+ scoped_ptr<InputEventStreamValidator> optional_output_stream_validator_;
DISALLOW_COPY_AND_ASSIGN(InputRouterImpl);
};

Powered by Google App Engine
This is Rietveld 408576698