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 22 matching lines...) Expand all Loading... |
33 } | 33 } |
34 | 34 |
35 namespace content { | 35 namespace content { |
36 | 36 |
37 class BrowserAccessibilityManager; | 37 class BrowserAccessibilityManager; |
38 class RenderWidgetHostImpl; | 38 class RenderWidgetHostImpl; |
39 class RenderWidgetHostInputEventRouter; | 39 class RenderWidgetHostInputEventRouter; |
40 class RenderViewHostDelegateView; | 40 class RenderViewHostDelegateView; |
41 class TextInputManager; | 41 class TextInputManager; |
42 class WebContents; | 42 class WebContents; |
| 43 enum class KeyboardEventProcessingResult; |
43 struct ScreenInfo; | 44 struct ScreenInfo; |
44 struct NativeWebKeyboardEvent; | 45 struct NativeWebKeyboardEvent; |
45 | 46 |
46 // | 47 // |
47 // RenderWidgetHostDelegate | 48 // RenderWidgetHostDelegate |
48 // | 49 // |
49 // An interface implemented by an object interested in knowing about the state | 50 // An interface implemented by an object interested in knowing about the state |
50 // of the RenderWidgetHost. | 51 // of the RenderWidgetHost. |
51 class CONTENT_EXPORT RenderWidgetHostDelegate { | 52 class CONTENT_EXPORT RenderWidgetHostDelegate { |
52 public: | 53 public: |
(...skipping 17 matching lines...) Expand all Loading... |
70 // The screen info has changed. | 71 // The screen info has changed. |
71 virtual void ScreenInfoChanged() {} | 72 virtual void ScreenInfoChanged() {} |
72 | 73 |
73 // Sets the device scale factor for frames associated with this WebContents. | 74 // Sets the device scale factor for frames associated with this WebContents. |
74 virtual void UpdateDeviceScaleFactor(double device_scale_factor) {} | 75 virtual void UpdateDeviceScaleFactor(double device_scale_factor) {} |
75 | 76 |
76 // Retrieve screen information. | 77 // Retrieve screen information. |
77 virtual void GetScreenInfo(ScreenInfo* web_screen_info); | 78 virtual void GetScreenInfo(ScreenInfo* web_screen_info); |
78 | 79 |
79 // Callback to give the browser a chance to handle the specified keyboard | 80 // Callback to give the browser a chance to handle the specified keyboard |
80 // event before sending it to the renderer. | 81 // event before sending it to the renderer. See enum for details on return |
81 // Returns true if the |event| was handled. Otherwise, if the |event| would | 82 // value. |
82 // be handled in HandleKeyboardEvent() method as a normal keyboard shortcut, | 83 virtual KeyboardEventProcessingResult PreHandleKeyboardEvent( |
83 // |*is_keyboard_shortcut| should be set to true. | 84 const NativeWebKeyboardEvent& event); |
84 virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, | |
85 bool* is_keyboard_shortcut); | |
86 | 85 |
87 // Callback to inform the browser that the renderer did not process the | 86 // Callback to inform the browser that the renderer did not process the |
88 // specified events. This gives an opportunity to the browser to process the | 87 // specified events. This gives an opportunity to the browser to process the |
89 // event (used for keyboard shortcuts). | 88 // event (used for keyboard shortcuts). |
90 virtual void HandleKeyboardEvent(const NativeWebKeyboardEvent& event) {} | 89 virtual void HandleKeyboardEvent(const NativeWebKeyboardEvent& event) {} |
91 | 90 |
92 // Callback to inform the browser that the renderer did not process the | 91 // Callback to inform the browser that the renderer did not process the |
93 // specified mouse wheel event. Returns true if the browser has handled | 92 // specified mouse wheel event. Returns true if the browser has handled |
94 // the event itself. | 93 // the event itself. |
95 virtual bool HandleWheelEvent(const blink::WebMouseWheelEvent& event); | 94 virtual bool HandleWheelEvent(const blink::WebMouseWheelEvent& event); |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 // not a WebContents, returns nullptr. | 245 // not a WebContents, returns nullptr. |
247 virtual WebContents* GetAsWebContents(); | 246 virtual WebContents* GetAsWebContents(); |
248 | 247 |
249 protected: | 248 protected: |
250 virtual ~RenderWidgetHostDelegate() {} | 249 virtual ~RenderWidgetHostDelegate() {} |
251 }; | 250 }; |
252 | 251 |
253 } // namespace content | 252 } // namespace content |
254 | 253 |
255 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_DELEGATE_H_ | 254 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_DELEGATE_H_ |
OLD | NEW |