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" |
11 #include "content/common/content_export.h" | 11 #include "content/common/content_export.h" |
12 #include "content/public/browser/native_web_keyboard_event.h" | 12 #include "content/public/browser/native_web_keyboard_event.h" |
13 #include "content/public/common/drop_data.h" | 13 #include "content/public/common/drop_data.h" |
14 #include "ipc/ipc_channel.h" | 14 #include "ipc/ipc_channel.h" |
15 #include "ipc/ipc_sender.h" | 15 #include "ipc/ipc_sender.h" |
16 #include "third_party/WebKit/public/platform/WebDragOperation.h" | 16 #include "third_party/WebKit/public/platform/WebDragOperation.h" |
17 #include "third_party/WebKit/public/platform/WebGestureEvent.h" | 17 #include "third_party/WebKit/public/platform/WebGestureEvent.h" |
18 #include "third_party/WebKit/public/platform/WebInputEvent.h" | 18 #include "third_party/WebKit/public/platform/WebInputEvent.h" |
19 #include "third_party/WebKit/public/web/WebTextDirection.h" | 19 #include "third_party/WebKit/public/web/WebTextDirection.h" |
20 #include "ui/gfx/geometry/size.h" | 20 #include "ui/gfx/geometry/size.h" |
21 #include "ui/surface/transport_dib.h" | 21 #include "ui/surface/transport_dib.h" |
22 | 22 |
23 namespace blink { | 23 namespace blink { |
24 class WebMouseEvent; | 24 class WebMouseEvent; |
25 class WebMouseWheelEvent; | 25 class WebMouseWheelEvent; |
26 } | 26 } |
27 | 27 |
| 28 namespace ui { |
| 29 class LatencyInfo; |
| 30 } |
| 31 |
28 namespace content { | 32 namespace content { |
29 | 33 |
30 struct CursorInfo; | 34 struct CursorInfo; |
31 class RenderProcessHost; | 35 class RenderProcessHost; |
32 class RenderWidgetHostIterator; | 36 class RenderWidgetHostIterator; |
33 class RenderWidgetHostView; | 37 class RenderWidgetHostView; |
34 struct ScreenInfo; | 38 struct ScreenInfo; |
35 | 39 |
36 // A RenderWidgetHost manages the browser side of a browser<->renderer | 40 // A RenderWidgetHost manages the browser side of a browser<->renderer |
37 // HWND connection. The HWND lives in the browser process, and | 41 // HWND connection. The HWND lives in the browser process, and |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 virtual void SetActive(bool active) = 0; | 163 virtual void SetActive(bool active) = 0; |
160 | 164 |
161 // Forwards the given message to the renderer. These are called by | 165 // Forwards the given message to the renderer. These are called by |
162 // the view when it has received a message. | 166 // the view when it has received a message. |
163 virtual void ForwardMouseEvent( | 167 virtual void ForwardMouseEvent( |
164 const blink::WebMouseEvent& mouse_event) = 0; | 168 const blink::WebMouseEvent& mouse_event) = 0; |
165 virtual void ForwardWheelEvent( | 169 virtual void ForwardWheelEvent( |
166 const blink::WebMouseWheelEvent& wheel_event) = 0; | 170 const blink::WebMouseWheelEvent& wheel_event) = 0; |
167 virtual void ForwardKeyboardEvent( | 171 virtual void ForwardKeyboardEvent( |
168 const NativeWebKeyboardEvent& key_event) = 0; | 172 const NativeWebKeyboardEvent& key_event) = 0; |
| 173 virtual void ForwardKeyboardEventWithLatencyInfo( |
| 174 const NativeWebKeyboardEvent& key_event, |
| 175 const ui::LatencyInfo& latency_info) = 0; |
169 virtual void ForwardGestureEvent( | 176 virtual void ForwardGestureEvent( |
170 const blink::WebGestureEvent& gesture_event) = 0; | 177 const blink::WebGestureEvent& gesture_event) = 0; |
171 | 178 |
172 virtual RenderProcessHost* GetProcess() const = 0; | 179 virtual RenderProcessHost* GetProcess() const = 0; |
173 | 180 |
174 virtual int GetRoutingID() const = 0; | 181 virtual int GetRoutingID() const = 0; |
175 | 182 |
176 // Gets the View of this RenderWidgetHost. Can be nullptr, e.g. if the | 183 // Gets the View of this RenderWidgetHost. Can be nullptr, e.g. if the |
177 // RenderWidget is being destroyed or the render process crashed. You should | 184 // RenderWidget is being destroyed or the render process crashed. You should |
178 // never cache this pointer since it can become nullptr if the renderer | 185 // never cache this pointer since it can become nullptr if the renderer |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 // Filters drop data before it is passed to RenderWidgetHost. | 272 // Filters drop data before it is passed to RenderWidgetHost. |
266 virtual void FilterDropData(DropData* drop_data) {} | 273 virtual void FilterDropData(DropData* drop_data) {} |
267 | 274 |
268 // Sets cursor to a specified one when it is over this widget. | 275 // Sets cursor to a specified one when it is over this widget. |
269 virtual void SetCursor(const CursorInfo& cursor_info) {} | 276 virtual void SetCursor(const CursorInfo& cursor_info) {} |
270 }; | 277 }; |
271 | 278 |
272 } // namespace content | 279 } // namespace content |
273 | 280 |
274 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ | 281 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ |
OLD | NEW |