| 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> |
| 11 | 11 |
| 12 #include "build/build_config.h" | 12 #include "build/build_config.h" |
| 13 #include "content/common/content_export.h" | 13 #include "content/common/content_export.h" |
| 14 #include "third_party/WebKit/public/platform/WebDisplayMode.h" | 14 #include "third_party/WebKit/public/platform/WebDisplayMode.h" |
| 15 #include "third_party/WebKit/public/web/WebInputEvent.h" | 15 #include "third_party/WebKit/public/web/WebInputEvent.h" |
| 16 #include "ui/gfx/native_widget_types.h" | 16 #include "ui/gfx/native_widget_types.h" |
| 17 | 17 |
| 18 namespace blink { | 18 namespace blink { |
| 19 class WebMouseWheelEvent; | 19 class WebMouseWheelEvent; |
| 20 class WebGestureEvent; | 20 class WebGestureEvent; |
| 21 struct WebScreenInfo; | |
| 22 } | 21 } |
| 23 | 22 |
| 24 namespace gfx { | 23 namespace gfx { |
| 25 class Point; | 24 class Point; |
| 26 class Rect; | 25 class Rect; |
| 27 class Size; | 26 class Size; |
| 28 } | 27 } |
| 29 | 28 |
| 30 namespace content { | 29 namespace content { |
| 31 | 30 |
| 32 class BrowserAccessibilityManager; | 31 class BrowserAccessibilityManager; |
| 33 class RenderWidgetHostImpl; | 32 class RenderWidgetHostImpl; |
| 34 class RenderWidgetHostInputEventRouter; | 33 class RenderWidgetHostInputEventRouter; |
| 35 class TextInputManager; | 34 class TextInputManager; |
| 35 struct ScreenInfo; |
| 36 struct NativeWebKeyboardEvent; | 36 struct NativeWebKeyboardEvent; |
| 37 | 37 |
| 38 // | 38 // |
| 39 // RenderWidgetHostDelegate | 39 // RenderWidgetHostDelegate |
| 40 // | 40 // |
| 41 // An interface implemented by an object interested in knowing about the state | 41 // An interface implemented by an object interested in knowing about the state |
| 42 // of the RenderWidgetHost. | 42 // of the RenderWidgetHost. |
| 43 class CONTENT_EXPORT RenderWidgetHostDelegate { | 43 class CONTENT_EXPORT RenderWidgetHostDelegate { |
| 44 public: | 44 public: |
| 45 // The RenderWidgetHost has just been created. | 45 // The RenderWidgetHost has just been created. |
| (...skipping 13 matching lines...) Expand all Loading... |
| 59 virtual void ResizeDueToAutoResize(RenderWidgetHostImpl* render_widget_host, | 59 virtual void ResizeDueToAutoResize(RenderWidgetHostImpl* render_widget_host, |
| 60 const gfx::Size& new_size) {} | 60 const gfx::Size& new_size) {} |
| 61 | 61 |
| 62 // The screen info has changed. | 62 // The screen info has changed. |
| 63 virtual void ScreenInfoChanged() {} | 63 virtual void ScreenInfoChanged() {} |
| 64 | 64 |
| 65 // Sets the device scale factor for frames associated with this WebContents. | 65 // Sets the device scale factor for frames associated with this WebContents. |
| 66 virtual void UpdateDeviceScaleFactor(double device_scale_factor) {} | 66 virtual void UpdateDeviceScaleFactor(double device_scale_factor) {} |
| 67 | 67 |
| 68 // Retrieve screen information. | 68 // Retrieve screen information. |
| 69 virtual void GetScreenInfo(blink::WebScreenInfo* web_screen_info); | 69 virtual void GetScreenInfo(ScreenInfo* web_screen_info); |
| 70 | 70 |
| 71 // Callback to give the browser a chance to handle the specified keyboard | 71 // Callback to give the browser a chance to handle the specified keyboard |
| 72 // event before sending it to the renderer. | 72 // event before sending it to the renderer. |
| 73 // Returns true if the |event| was handled. Otherwise, if the |event| would | 73 // Returns true if the |event| was handled. Otherwise, if the |event| would |
| 74 // be handled in HandleKeyboardEvent() method as a normal keyboard shortcut, | 74 // be handled in HandleKeyboardEvent() method as a normal keyboard shortcut, |
| 75 // |*is_keyboard_shortcut| should be set to true. | 75 // |*is_keyboard_shortcut| should be set to true. |
| 76 virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, | 76 virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, |
| 77 bool* is_keyboard_shortcut); | 77 bool* is_keyboard_shortcut); |
| 78 | 78 |
| 79 // Callback to inform the browser that the renderer did not process the | 79 // Callback to inform the browser that the renderer did not process the |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 // this RenderWidgetHost. | 222 // this RenderWidgetHost. |
| 223 virtual bool IsHidden(); | 223 virtual bool IsHidden(); |
| 224 | 224 |
| 225 protected: | 225 protected: |
| 226 virtual ~RenderWidgetHostDelegate() {} | 226 virtual ~RenderWidgetHostDelegate() {} |
| 227 }; | 227 }; |
| 228 | 228 |
| 229 } // namespace content | 229 } // namespace content |
| 230 | 230 |
| 231 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_DELEGATE_H_ | 231 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_DELEGATE_H_ |
| OLD | NEW |