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_BROWSER_RENDER_WIDGET_HOST_DELEGATE_H_ | 5 #ifndef CONTENT_BROWSER_RENDER_WIDGET_HOST_DELEGATE_H_ |
6 #define CONTENT_BROWSER_RENDER_WIDGET_HOST_DELEGATE_H_ | 6 #define CONTENT_BROWSER_RENDER_WIDGET_HOST_DELEGATE_H_ |
7 | 7 |
8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
9 #include "content/common/content_export.h" | 9 #include "content/common/content_export.h" |
10 #include "ui/gfx/native_widget_types.h" | 10 #include "ui/gfx/native_widget_types.h" |
11 | 11 |
12 namespace blink { | 12 namespace blink { |
13 class WebMouseWheelEvent; | 13 class WebMouseWheelEvent; |
| 14 class WebGestureEvent; |
14 } | 15 } |
15 | 16 |
16 namespace content { | 17 namespace content { |
17 | 18 |
18 class RenderWidgetHostImpl; | 19 class RenderWidgetHostImpl; |
19 struct NativeWebKeyboardEvent; | 20 struct NativeWebKeyboardEvent; |
20 | 21 |
21 // | 22 // |
22 // RenderWidgetHostDelegate | 23 // RenderWidgetHostDelegate |
23 // | 24 // |
(...skipping 15 matching lines...) Expand all Loading... |
39 // Callback to inform the browser that the renderer did not process the | 40 // Callback to inform the browser that the renderer did not process the |
40 // specified events. This gives an opportunity to the browser to process the | 41 // specified events. This gives an opportunity to the browser to process the |
41 // event (used for keyboard shortcuts). | 42 // event (used for keyboard shortcuts). |
42 virtual void HandleKeyboardEvent(const NativeWebKeyboardEvent& event) {} | 43 virtual void HandleKeyboardEvent(const NativeWebKeyboardEvent& event) {} |
43 | 44 |
44 // Callback to give the browser a chance to handle the specified mouse wheel | 45 // Callback to give the browser a chance to handle the specified mouse wheel |
45 // event before sending it to the renderer. | 46 // event before sending it to the renderer. |
46 // Returns true if the |event| was handled. | 47 // Returns true if the |event| was handled. |
47 virtual bool PreHandleWheelEvent(const blink::WebMouseWheelEvent& event); | 48 virtual bool PreHandleWheelEvent(const blink::WebMouseWheelEvent& event); |
48 | 49 |
| 50 // Callback to give the browser a chance to handle the specified gesture |
| 51 // event before sending it to the renderer. |
| 52 // Returns true if the |event| was handled. |
| 53 virtual bool PreHandleGestureEvent(const blink::WebGestureEvent& event); |
| 54 |
49 // Notifies that screen rects were sent to renderer process. | 55 // Notifies that screen rects were sent to renderer process. |
50 virtual void DidSendScreenRects(RenderWidgetHostImpl* rwh) {} | 56 virtual void DidSendScreenRects(RenderWidgetHostImpl* rwh) {} |
51 | 57 |
52 #if defined(OS_WIN) | 58 #if defined(OS_WIN) |
53 // Returns the widget's parent's NativeViewAccessible. | 59 // Returns the widget's parent's NativeViewAccessible. |
54 virtual gfx::NativeViewAccessible GetParentNativeViewAccessible(); | 60 virtual gfx::NativeViewAccessible GetParentNativeViewAccessible(); |
55 #endif | 61 #endif |
56 | 62 |
57 protected: | 63 protected: |
58 virtual ~RenderWidgetHostDelegate() {} | 64 virtual ~RenderWidgetHostDelegate() {} |
59 }; | 65 }; |
60 | 66 |
61 } // namespace content | 67 } // namespace content |
62 | 68 |
63 #endif // CONTENT_BROWSER_RENDER_WIDGET_HOST_DELEGATE_H_ | 69 #endif // CONTENT_BROWSER_RENDER_WIDGET_HOST_DELEGATE_H_ |
OLD | NEW |