OLD | NEW |
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 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 virtual void AddKeyPressEventCallback( | 236 virtual void AddKeyPressEventCallback( |
237 const KeyPressEventCallback& callback) = 0; | 237 const KeyPressEventCallback& callback) = 0; |
238 virtual void RemoveKeyPressEventCallback( | 238 virtual void RemoveKeyPressEventCallback( |
239 const KeyPressEventCallback& callback) = 0; | 239 const KeyPressEventCallback& callback) = 0; |
240 | 240 |
241 // Add/remove a callback that can handle all kinds of mouse events. | 241 // Add/remove a callback that can handle all kinds of mouse events. |
242 typedef base::Callback<bool(const blink::WebMouseEvent&)> MouseEventCallback; | 242 typedef base::Callback<bool(const blink::WebMouseEvent&)> MouseEventCallback; |
243 virtual void AddMouseEventCallback(const MouseEventCallback& callback) = 0; | 243 virtual void AddMouseEventCallback(const MouseEventCallback& callback) = 0; |
244 virtual void RemoveMouseEventCallback(const MouseEventCallback& callback) = 0; | 244 virtual void RemoveMouseEventCallback(const MouseEventCallback& callback) = 0; |
245 | 245 |
246 // Observer for WebInputEvents. | 246 // Observer for WebInputEvents (but not input event acks). |
247 class InputEventObserver { | 247 class InputEventObserver { |
248 public: | 248 public: |
249 virtual ~InputEventObserver() {} | 249 virtual ~InputEventObserver() {} |
250 | 250 |
251 virtual void OnInputEvent(const blink::WebInputEvent&) {}; | 251 virtual void OnInputEvent(const blink::WebInputEvent&) = 0; |
252 virtual void OnInputEventAck(const blink::WebInputEvent&) {}; | |
253 }; | 252 }; |
254 | 253 |
255 // Add/remove an input event observer. | 254 // Add/remove an input event observer. |
256 virtual void AddInputEventObserver(InputEventObserver* observer) = 0; | 255 virtual void AddInputEventObserver(InputEventObserver* observer) = 0; |
257 virtual void RemoveInputEventObserver(InputEventObserver* observer) = 0; | 256 virtual void RemoveInputEventObserver(InputEventObserver* observer) = 0; |
258 | 257 |
259 // Get the screen info corresponding to this render widget. | 258 // Get the screen info corresponding to this render widget. |
260 virtual void GetScreenInfo(ScreenInfo* result) = 0; | 259 virtual void GetScreenInfo(ScreenInfo* result) = 0; |
261 | 260 |
262 // Sends a compositor proto to the render widget. | 261 // Sends a compositor proto to the render widget. |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 // This allows the renderer to reset some state. | 295 // This allows the renderer to reset some state. |
297 virtual void DragSourceSystemDragEnded() {}; | 296 virtual void DragSourceSystemDragEnded() {}; |
298 | 297 |
299 // Filters drop data before it is passed to RenderWidgetHost. | 298 // Filters drop data before it is passed to RenderWidgetHost. |
300 virtual void FilterDropData(DropData* drop_data) {} | 299 virtual void FilterDropData(DropData* drop_data) {} |
301 }; | 300 }; |
302 | 301 |
303 } // namespace content | 302 } // namespace content |
304 | 303 |
305 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ | 304 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ |
OLD | NEW |