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_RENDERER_HOST_RENDER_WIDGET_HOST_DELEGATE_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_DELEGATE_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_DELEGATE_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_DELEGATE_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <vector> | 10 #include <vector> |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
72 // specified events. This gives an opportunity to the browser to process the | 72 // specified events. This gives an opportunity to the browser to process the |
73 // event (used for keyboard shortcuts). | 73 // event (used for keyboard shortcuts). |
74 virtual void HandleKeyboardEvent(const NativeWebKeyboardEvent& event) {} | 74 virtual void HandleKeyboardEvent(const NativeWebKeyboardEvent& event) {} |
75 | 75 |
76 // Callback to inform the browser that the renderer did not process the | 76 // Callback to inform the browser that the renderer did not process the |
77 // specified mouse wheel event. Returns true if the browser has handled | 77 // specified mouse wheel event. Returns true if the browser has handled |
78 // the event itself. | 78 // the event itself. |
79 virtual bool HandleWheelEvent(const blink::WebMouseWheelEvent& event); | 79 virtual bool HandleWheelEvent(const blink::WebMouseWheelEvent& event); |
80 | 80 |
81 // Notification the user has performed a direct interaction (mouse down, mouse | 81 // Notification the user has performed a direct interaction (mouse down, mouse |
82 // wheel, raw key down, or gesture tap) while focus was on the page. Informs | 82 // wheel, raw key down, gesture tap, or browser navigation) while focus was on |
Charlie Reis
2016/02/25 18:28:02
nit: browser-initiated navigation
dominickn
2016/02/26 00:36:11
Done.
| |
83 // the delegate that a user is interacting with a site. Only the first mouse | 83 // the page. Informs the delegate that a user is interacting with a site. Only |
84 // wheel event during a scroll will trigger this method. | 84 // the first mouse wheel event during a scroll will trigger this method. |
85 virtual void OnUserInteraction(const blink::WebInputEvent::Type type) {} | 85 virtual void OnUserInteraction(RenderWidgetHostImpl* render_widget_host, |
86 const blink::WebInputEvent::Type type) {} | |
86 | 87 |
87 // Callback to give the browser a chance to handle the specified gesture | 88 // Callback to give the browser a chance to handle the specified gesture |
88 // event before sending it to the renderer. | 89 // event before sending it to the renderer. |
89 // Returns true if the |event| was handled. | 90 // Returns true if the |event| was handled. |
90 virtual bool PreHandleGestureEvent(const blink::WebGestureEvent& event); | 91 virtual bool PreHandleGestureEvent(const blink::WebGestureEvent& event); |
91 | 92 |
92 // Notification the user has made a gesture while focus was on the | |
93 // page. This is used to avoid uninitiated user downloads (aka carpet | |
94 // bombing), see DownloadRequestLimiter for details. | |
95 virtual void OnUserGesture(RenderWidgetHostImpl* render_widget_host) {} | |
96 | |
97 // Notifies that screen rects were sent to renderer process. | 93 // Notifies that screen rects were sent to renderer process. |
98 virtual void DidSendScreenRects(RenderWidgetHostImpl* rwh) {} | 94 virtual void DidSendScreenRects(RenderWidgetHostImpl* rwh) {} |
99 | 95 |
100 // Get the root BrowserAccessibilityManager for this frame tree. | 96 // Get the root BrowserAccessibilityManager for this frame tree. |
101 virtual BrowserAccessibilityManager* GetRootBrowserAccessibilityManager(); | 97 virtual BrowserAccessibilityManager* GetRootBrowserAccessibilityManager(); |
102 | 98 |
103 // Get the root BrowserAccessibilityManager for this frame tree, | 99 // Get the root BrowserAccessibilityManager for this frame tree, |
104 // or create it if it doesn't exist. | 100 // or create it if it doesn't exist. |
105 virtual BrowserAccessibilityManager* | 101 virtual BrowserAccessibilityManager* |
106 GetOrCreateRootBrowserAccessibilityManager(); | 102 GetOrCreateRootBrowserAccessibilityManager(); |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
186 // WebContents. | 182 // WebContents. |
187 virtual void OnRenderFrameProxyVisibilityChanged(bool visible) {} | 183 virtual void OnRenderFrameProxyVisibilityChanged(bool visible) {} |
188 | 184 |
189 protected: | 185 protected: |
190 virtual ~RenderWidgetHostDelegate() {} | 186 virtual ~RenderWidgetHostDelegate() {} |
191 }; | 187 }; |
192 | 188 |
193 } // namespace content | 189 } // namespace content |
194 | 190 |
195 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_DELEGATE_H_ | 191 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_DELEGATE_H_ |
OLD | NEW |