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 // Add/remove a observer that can handle all kinds of input events. |
| 248 class InputEventObserver { |
| 249 public: |
| 250 virtual ~InputEventObserver() {} |
| 251 |
| 252 virtual bool OnInputEvent(const blink::WebInputEvent&) = 0; |
| 253 }; |
| 254 |
| 255 virtual void AddInputEventObserver(InputEventObserver* observer) = 0; |
| 256 virtual void RemoveInputEventObserver(InputEventObserver* observer) = 0; |
| 257 |
247 // Get the screen info corresponding to this render widget. | 258 // Get the screen info corresponding to this render widget. |
248 virtual void GetWebScreenInfo(blink::WebScreenInfo* result) = 0; | 259 virtual void GetWebScreenInfo(blink::WebScreenInfo* result) = 0; |
249 // Get the color profile corresponding to this render widget. | 260 // Get the color profile corresponding to this render widget. |
250 virtual bool GetScreenColorProfile(std::vector<char>* color_profile) = 0; | 261 virtual bool GetScreenColorProfile(std::vector<char>* color_profile) = 0; |
251 | 262 |
252 // Sends a compositor proto to the render widget. | 263 // Sends a compositor proto to the render widget. |
253 virtual void HandleCompositorProto(const std::vector<uint8_t>& proto) = 0; | 264 virtual void HandleCompositorProto(const std::vector<uint8_t>& proto) = 0; |
254 }; | 265 }; |
255 | 266 |
256 } // namespace content | 267 } // namespace content |
257 | 268 |
258 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ | 269 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ |
OLD | NEW |