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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 virtual void AddKeyPressEventCallback( | 237 virtual void AddKeyPressEventCallback( |
238 const KeyPressEventCallback& callback) = 0; | 238 const KeyPressEventCallback& callback) = 0; |
239 virtual void RemoveKeyPressEventCallback( | 239 virtual void RemoveKeyPressEventCallback( |
240 const KeyPressEventCallback& callback) = 0; | 240 const KeyPressEventCallback& callback) = 0; |
241 | 241 |
242 // Add/remove a callback that can handle all kinds of mouse events. | 242 // Add/remove a callback that can handle all kinds of mouse events. |
243 typedef base::Callback<bool(const blink::WebMouseEvent&)> MouseEventCallback; | 243 typedef base::Callback<bool(const blink::WebMouseEvent&)> MouseEventCallback; |
244 virtual void AddMouseEventCallback(const MouseEventCallback& callback) = 0; | 244 virtual void AddMouseEventCallback(const MouseEventCallback& callback) = 0; |
245 virtual void RemoveMouseEventCallback(const MouseEventCallback& callback) = 0; | 245 virtual void RemoveMouseEventCallback(const MouseEventCallback& callback) = 0; |
246 | 246 |
| 247 // Observer for WebInputEvents (but not input event acks). |
| 248 class InputEventObserver { |
| 249 public: |
| 250 virtual ~InputEventObserver() {} |
| 251 |
| 252 virtual void OnInputEvent(const blink::WebInputEvent&) = 0; |
| 253 }; |
| 254 |
| 255 // Add/remove an input event observer. |
| 256 virtual void AddInputEventObserver(InputEventObserver* observer) = 0; |
| 257 virtual void RemoveInputEventObserver(InputEventObserver* observer) = 0; |
| 258 |
247 // Get the screen info corresponding to this render widget. | 259 // Get the screen info corresponding to this render widget. |
248 virtual void GetWebScreenInfo(blink::WebScreenInfo* result) = 0; | 260 virtual void GetWebScreenInfo(blink::WebScreenInfo* result) = 0; |
249 // Get the color profile corresponding to this render widget. | 261 // Get the color profile corresponding to this render widget. |
250 virtual bool GetScreenColorProfile(std::vector<char>* color_profile) = 0; | 262 virtual bool GetScreenColorProfile(std::vector<char>* color_profile) = 0; |
251 | 263 |
252 // Sends a compositor proto to the render widget. | 264 // Sends a compositor proto to the render widget. |
253 virtual void HandleCompositorProto(const std::vector<uint8_t>& proto) = 0; | 265 virtual void HandleCompositorProto(const std::vector<uint8_t>& proto) = 0; |
254 }; | 266 }; |
255 | 267 |
256 } // namespace content | 268 } // namespace content |
257 | 269 |
258 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ | 270 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ |
OLD | NEW |