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

Side by Side Diff: content/public/browser/render_widget_host.h

Issue 2387353004: Delay Input.dispatchKeyEvent response until after key event ack. (Closed)
Patch Set: fix some review comments, fix a bug Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_
6 #define CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ 6 #define CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 virtual void AddKeyPressEventCallback( 233 virtual void AddKeyPressEventCallback(
234 const KeyPressEventCallback& callback) = 0; 234 const KeyPressEventCallback& callback) = 0;
235 virtual void RemoveKeyPressEventCallback( 235 virtual void RemoveKeyPressEventCallback(
236 const KeyPressEventCallback& callback) = 0; 236 const KeyPressEventCallback& callback) = 0;
237 237
238 // Add/remove a callback that can handle all kinds of mouse events. 238 // Add/remove a callback that can handle all kinds of mouse events.
239 typedef base::Callback<bool(const blink::WebMouseEvent&)> MouseEventCallback; 239 typedef base::Callback<bool(const blink::WebMouseEvent&)> MouseEventCallback;
240 virtual void AddMouseEventCallback(const MouseEventCallback& callback) = 0; 240 virtual void AddMouseEventCallback(const MouseEventCallback& callback) = 0;
241 virtual void RemoveMouseEventCallback(const MouseEventCallback& callback) = 0; 241 virtual void RemoveMouseEventCallback(const MouseEventCallback& callback) = 0;
242 242
243 // Observer for WebInputEvents (but not input event acks). 243 // Observer for WebInputEvents.
244 class InputEventObserver { 244 class InputEventObserver {
245 public: 245 public:
246 virtual ~InputEventObserver() {} 246 virtual ~InputEventObserver() {}
247 247
248 virtual void OnInputEvent(const blink::WebInputEvent&) = 0; 248 virtual void OnInputEvent(const blink::WebInputEvent&) = 0;
249 virtual void OnInputEventAck(const blink::WebInputEvent&, bool) = 0;
dtapuska 2016/10/14 19:06:29 I think you need to document what this boolean rep
samuong 2016/10/20 23:36:18 Done.
249 }; 250 };
250 251
251 // Add/remove an input event observer. 252 // Add/remove an input event observer.
252 virtual void AddInputEventObserver(InputEventObserver* observer) = 0; 253 virtual void AddInputEventObserver(InputEventObserver* observer) = 0;
253 virtual void RemoveInputEventObserver(InputEventObserver* observer) = 0; 254 virtual void RemoveInputEventObserver(InputEventObserver* observer) = 0;
254 255
255 // Get the screen info corresponding to this render widget. 256 // Get the screen info corresponding to this render widget.
256 virtual void GetScreenInfo(ScreenInfo* result) = 0; 257 virtual void GetScreenInfo(ScreenInfo* result) = 0;
257 258
258 // Sends a compositor proto to the render widget. 259 // Sends a compositor proto to the render widget.
259 virtual void HandleCompositorProto(const std::vector<uint8_t>& proto) = 0; 260 virtual void HandleCompositorProto(const std::vector<uint8_t>& proto) = 0;
260 }; 261 };
261 262
262 } // namespace content 263 } // namespace content
263 264
264 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ 265 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698