| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #ifndef WebWidget_h | 31 #ifndef WebWidget_h |
| 32 #define WebWidget_h | 32 #define WebWidget_h |
| 33 | 33 |
| 34 #include "public/platform/WebBrowserControlsState.h" | 34 #include "public/platform/WebBrowserControlsState.h" |
| 35 #include "public/platform/WebCanvas.h" | 35 #include "public/platform/WebCanvas.h" |
| 36 #include "public/platform/WebCommon.h" | 36 #include "public/platform/WebCommon.h" |
| 37 #include "public/platform/WebFloatPoint.h" |
| 37 #include "public/platform/WebFloatSize.h" | 38 #include "public/platform/WebFloatSize.h" |
| 38 #include "public/platform/WebInputEventResult.h" | 39 #include "public/platform/WebInputEventResult.h" |
| 39 #include "public/platform/WebMenuSourceType.h" | 40 #include "public/platform/WebMenuSourceType.h" |
| 40 #include "public/platform/WebPoint.h" | 41 #include "public/platform/WebPoint.h" |
| 41 #include "public/platform/WebRect.h" | 42 #include "public/platform/WebRect.h" |
| 42 #include "public/platform/WebSize.h" | 43 #include "public/platform/WebSize.h" |
| 43 #include "public/platform/WebTextInputInfo.h" | 44 #include "public/platform/WebTextInputInfo.h" |
| 44 #include "public/web/WebCompositionUnderline.h" | 45 #include "public/web/WebCompositionUnderline.h" |
| 46 #include "public/web/WebHitTestResult.h" |
| 45 #include "public/web/WebRange.h" | 47 #include "public/web/WebRange.h" |
| 46 #include "public/web/WebTextDirection.h" | 48 #include "public/web/WebTextDirection.h" |
| 47 | 49 |
| 48 namespace blink { | 50 namespace blink { |
| 49 | 51 |
| 50 class WebCompositeAndReadbackAsyncCallback; | 52 class WebCompositeAndReadbackAsyncCallback; |
| 51 class WebCoalescedInputEvent; | 53 class WebCoalescedInputEvent; |
| 52 class WebLayoutAndPaintAsyncCallback; | 54 class WebLayoutAndPaintAsyncCallback; |
| 53 class WebPagePopup; | 55 class WebPagePopup; |
| 54 struct WebPoint; | 56 struct WebPoint; |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 // WebCompositeAndReadbackAsyncCallback object alive until it is called. This | 114 // WebCompositeAndReadbackAsyncCallback object alive until it is called. This |
| 113 // should only be called when isAcceleratedCompositingActive() is true. | 115 // should only be called when isAcceleratedCompositingActive() is true. |
| 114 virtual void CompositeAndReadbackAsync( | 116 virtual void CompositeAndReadbackAsync( |
| 115 WebCompositeAndReadbackAsyncCallback*) {} | 117 WebCompositeAndReadbackAsyncCallback*) {} |
| 116 | 118 |
| 117 // Called to inform the WebWidget of a change in theme. | 119 // Called to inform the WebWidget of a change in theme. |
| 118 // Implementors that cache rendered copies of widgets need to re-render | 120 // Implementors that cache rendered copies of widgets need to re-render |
| 119 // on receiving this message | 121 // on receiving this message |
| 120 virtual void ThemeChanged() {} | 122 virtual void ThemeChanged() {} |
| 121 | 123 |
| 124 // Do a hit test at given point and return the WebHitTestResult. |
| 125 virtual WebHitTestResult HitTestResultAt(const WebPoint&) { |
| 126 return WebHitTestResult(); |
| 127 } |
| 128 |
| 122 // Called to inform the WebWidget of an input event. | 129 // Called to inform the WebWidget of an input event. |
| 123 virtual WebInputEventResult HandleInputEvent(const WebCoalescedInputEvent&) { | 130 virtual WebInputEventResult HandleInputEvent(const WebCoalescedInputEvent&) { |
| 124 return WebInputEventResult::kNotHandled; | 131 return WebInputEventResult::kNotHandled; |
| 125 } | 132 } |
| 126 | 133 |
| 127 // Called to inform the WebWidget of the mouse cursor's visibility. | 134 // Called to inform the WebWidget of the mouse cursor's visibility. |
| 128 virtual void SetCursorVisibilityState(bool is_visible) {} | 135 virtual void SetCursorVisibilityState(bool is_visible) {} |
| 129 | 136 |
| 130 // Check whether the given point hits any registered touch event handlers. | 137 // Check whether the given point hits any registered touch event handlers. |
| 131 virtual bool HasTouchEventHandlersAt(const WebPoint&) { return true; } | 138 virtual bool HasTouchEventHandlersAt(const WebPoint&) { return true; } |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 // Called by client to request showing the context menu. | 232 // Called by client to request showing the context menu. |
| 226 virtual void ShowContextMenu(WebMenuSourceType) {} | 233 virtual void ShowContextMenu(WebMenuSourceType) {} |
| 227 | 234 |
| 228 protected: | 235 protected: |
| 229 ~WebWidget() {} | 236 ~WebWidget() {} |
| 230 }; | 237 }; |
| 231 | 238 |
| 232 } // namespace blink | 239 } // namespace blink |
| 233 | 240 |
| 234 #endif | 241 #endif |
| OLD | NEW |