| 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/keyboard_listener.h" | 10 #include "content/public/browser/keyboard_listener.h" |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 | 194 |
| 195 // Forwards the given message to the renderer. These are called by | 195 // Forwards the given message to the renderer. These are called by |
| 196 // the view when it has received a message. | 196 // the view when it has received a message. |
| 197 virtual void ForwardMouseEvent( | 197 virtual void ForwardMouseEvent( |
| 198 const WebKit::WebMouseEvent& mouse_event) = 0; | 198 const WebKit::WebMouseEvent& mouse_event) = 0; |
| 199 virtual void ForwardWheelEvent( | 199 virtual void ForwardWheelEvent( |
| 200 const WebKit::WebMouseWheelEvent& wheel_event) = 0; | 200 const WebKit::WebMouseWheelEvent& wheel_event) = 0; |
| 201 virtual void ForwardKeyboardEvent( | 201 virtual void ForwardKeyboardEvent( |
| 202 const NativeWebKeyboardEvent& key_event) = 0; | 202 const NativeWebKeyboardEvent& key_event) = 0; |
| 203 | 203 |
| 204 virtual const gfx::Point& GetLastScrollOffset() const = 0; | 204 virtual const gfx::Vector2d& GetLastScrollOffset() const = 0; |
| 205 | 205 |
| 206 virtual RenderProcessHost* GetProcess() const = 0; | 206 virtual RenderProcessHost* GetProcess() const = 0; |
| 207 | 207 |
| 208 virtual int GetRoutingID() const = 0; | 208 virtual int GetRoutingID() const = 0; |
| 209 | 209 |
| 210 // Gets the View of this RenderWidgetHost. Can be NULL, e.g. if the | 210 // Gets the View of this RenderWidgetHost. Can be NULL, e.g. if the |
| 211 // RenderWidget is being destroyed or the render process crashed. You should | 211 // RenderWidget is being destroyed or the render process crashed. You should |
| 212 // never cache this pointer since it can become NULL if the renderer crashes, | 212 // never cache this pointer since it can become NULL if the renderer crashes, |
| 213 // instead you should always ask for it using the accessor. | 213 // instead you should always ask for it using the accessor. |
| 214 virtual RenderWidgetHostView* GetView() const = 0; | 214 virtual RenderWidgetHostView* GetView() const = 0; |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 // within content/. This method is necessary because | 276 // within content/. This method is necessary because |
| 277 // RenderWidgetHost is the root of a diamond inheritance pattern, so | 277 // RenderWidgetHost is the root of a diamond inheritance pattern, so |
| 278 // subclasses inherit it virtually, which removes our ability to | 278 // subclasses inherit it virtually, which removes our ability to |
| 279 // static_cast to the subclass. | 279 // static_cast to the subclass. |
| 280 virtual RenderWidgetHostImpl* AsRenderWidgetHostImpl() = 0; | 280 virtual RenderWidgetHostImpl* AsRenderWidgetHostImpl() = 0; |
| 281 }; | 281 }; |
| 282 | 282 |
| 283 } // namespace content | 283 } // namespace content |
| 284 | 284 |
| 285 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ | 285 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ |
| OLD | NEW |