| 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 "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "content/common/content_export.h" | 9 #include "content/common/content_export.h" |
| 10 #include "content/public/browser/native_web_keyboard_event.h" | 10 #include "content/public/browser/native_web_keyboard_event.h" |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 | 191 |
| 192 // Forwards the given message to the renderer. These are called by | 192 // Forwards the given message to the renderer. These are called by |
| 193 // the view when it has received a message. | 193 // the view when it has received a message. |
| 194 virtual void ForwardMouseEvent( | 194 virtual void ForwardMouseEvent( |
| 195 const blink::WebMouseEvent& mouse_event) = 0; | 195 const blink::WebMouseEvent& mouse_event) = 0; |
| 196 virtual void ForwardWheelEvent( | 196 virtual void ForwardWheelEvent( |
| 197 const blink::WebMouseWheelEvent& wheel_event) = 0; | 197 const blink::WebMouseWheelEvent& wheel_event) = 0; |
| 198 virtual void ForwardKeyboardEvent( | 198 virtual void ForwardKeyboardEvent( |
| 199 const NativeWebKeyboardEvent& key_event) = 0; | 199 const NativeWebKeyboardEvent& key_event) = 0; |
| 200 | 200 |
| 201 virtual const gfx::Vector2d& GetLastScrollOffset() const = 0; | |
| 202 | |
| 203 virtual RenderProcessHost* GetProcess() const = 0; | 201 virtual RenderProcessHost* GetProcess() const = 0; |
| 204 | 202 |
| 205 virtual int GetRoutingID() const = 0; | 203 virtual int GetRoutingID() const = 0; |
| 206 | 204 |
| 207 // Gets the View of this RenderWidgetHost. Can be NULL, e.g. if the | 205 // Gets the View of this RenderWidgetHost. Can be NULL, e.g. if the |
| 208 // RenderWidget is being destroyed or the render process crashed. You should | 206 // RenderWidget is being destroyed or the render process crashed. You should |
| 209 // never cache this pointer since it can become NULL if the renderer crashes, | 207 // never cache this pointer since it can become NULL if the renderer crashes, |
| 210 // instead you should always ask for it using the accessor. | 208 // instead you should always ask for it using the accessor. |
| 211 virtual RenderWidgetHostView* GetView() const = 0; | 209 virtual RenderWidgetHostView* GetView() const = 0; |
| 212 | 210 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 // within content/. This method is necessary because | 258 // within content/. This method is necessary because |
| 261 // RenderWidgetHost is the root of a diamond inheritance pattern, so | 259 // RenderWidgetHost is the root of a diamond inheritance pattern, so |
| 262 // subclasses inherit it virtually, which removes our ability to | 260 // subclasses inherit it virtually, which removes our ability to |
| 263 // static_cast to the subclass. | 261 // static_cast to the subclass. |
| 264 virtual RenderWidgetHostImpl* AsRenderWidgetHostImpl() = 0; | 262 virtual RenderWidgetHostImpl* AsRenderWidgetHostImpl() = 0; |
| 265 }; | 263 }; |
| 266 | 264 |
| 267 } // namespace content | 265 } // namespace content |
| 268 | 266 |
| 269 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ | 267 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ |
| OLD | NEW |