Chromium Code Reviews| 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/events/latency_info.h" | |
|
mfomitchev
2017/04/04 14:59:06
Declare instead of including in .h.
tdresser
2017/05/01 15:49:21
Done.
| |
| 20 #include "ui/gfx/geometry/size.h" | 21 #include "ui/gfx/geometry/size.h" |
| 21 #include "ui/surface/transport_dib.h" | 22 #include "ui/surface/transport_dib.h" |
| 22 | 23 |
| 23 namespace blink { | 24 namespace blink { |
| 24 class WebMouseEvent; | 25 class WebMouseEvent; |
| 25 class WebMouseWheelEvent; | 26 class WebMouseWheelEvent; |
| 26 } | 27 } |
| 27 | 28 |
| 28 namespace content { | 29 namespace content { |
| 29 | 30 |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 156 // window will show active controls even if the focus is not in the web | 157 // window will show active controls even if the focus is not in the web |
| 157 // contents, but e.g. in the omnibox. | 158 // contents, but e.g. in the omnibox. |
| 158 virtual void SetActive(bool active) = 0; | 159 virtual void SetActive(bool active) = 0; |
| 159 | 160 |
| 160 // Forwards the given message to the renderer. These are called by | 161 // Forwards the given message to the renderer. These are called by |
| 161 // the view when it has received a message. | 162 // the view when it has received a message. |
| 162 virtual void ForwardMouseEvent( | 163 virtual void ForwardMouseEvent( |
| 163 const blink::WebMouseEvent& mouse_event) = 0; | 164 const blink::WebMouseEvent& mouse_event) = 0; |
| 164 virtual void ForwardWheelEvent( | 165 virtual void ForwardWheelEvent( |
| 165 const blink::WebMouseWheelEvent& wheel_event) = 0; | 166 const blink::WebMouseWheelEvent& wheel_event) = 0; |
| 166 virtual void ForwardKeyboardEvent( | 167 virtual void ForwardKeyboardEventWithLatencyInfo( |
|
mfomitchev
2017/04/04 14:59:06
With other events we only have "WithLatencyInfo" v
tdresser
2017/05/01 15:49:21
This is only required for FindBarHost, which has a
mfomitchev
2017/05/04 20:36:05
Could FindBarHost do RenderWidgetHostImpl::From()
tdresser
2017/05/09 15:29:25
FindBarHost can't access RenderWidgetHostImpl due
mfomitchev
2017/05/09 17:35:23
I see. That sounds reasonable to me - at least we'
tdresser
2017/05/10 14:27:15
Done.
| |
| 167 const NativeWebKeyboardEvent& key_event) = 0; | 168 const NativeWebKeyboardEvent& key_event, |
| 169 const ui::LatencyInfo& latency) = 0; | |
| 168 virtual void ForwardGestureEvent( | 170 virtual void ForwardGestureEvent( |
| 169 const blink::WebGestureEvent& gesture_event) = 0; | 171 const blink::WebGestureEvent& gesture_event) = 0; |
| 170 | 172 |
| 171 virtual RenderProcessHost* GetProcess() const = 0; | 173 virtual RenderProcessHost* GetProcess() const = 0; |
| 172 | 174 |
| 173 virtual int GetRoutingID() const = 0; | 175 virtual int GetRoutingID() const = 0; |
| 174 | 176 |
| 175 // Gets the View of this RenderWidgetHost. Can be nullptr, e.g. if the | 177 // Gets the View of this RenderWidgetHost. Can be nullptr, e.g. if the |
| 176 // RenderWidget is being destroyed or the render process crashed. You should | 178 // RenderWidget is being destroyed or the render process crashed. You should |
| 177 // never cache this pointer since it can become nullptr if the renderer | 179 // never cache this pointer since it can become nullptr if the renderer |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 261 // This allows the renderer to reset some state. | 263 // This allows the renderer to reset some state. |
| 262 virtual void DragSourceSystemDragEnded() {}; | 264 virtual void DragSourceSystemDragEnded() {}; |
| 263 | 265 |
| 264 // Filters drop data before it is passed to RenderWidgetHost. | 266 // Filters drop data before it is passed to RenderWidgetHost. |
| 265 virtual void FilterDropData(DropData* drop_data) {} | 267 virtual void FilterDropData(DropData* drop_data) {} |
| 266 }; | 268 }; |
| 267 | 269 |
| 268 } // namespace content | 270 } // namespace content |
| 269 | 271 |
| 270 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ | 272 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ |
| OLD | NEW |