Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(505)

Side by Side Diff: third_party/WebKit/public/web/WebWidget.h

Issue 2951053005: Add Mojo API for Blink hit testing (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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/WebFrame.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
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 // Finds out the frame that the point is positioned on.
125 virtual WebFrame* HitTestFrameAt(const WebFloatPoint& point) {
bokan 2017/07/18 19:26:35 Would we generalise this a little? Instead of hit
Navid Zolghadr 2017/07/18 19:34:14 I had something like that in mind. But I saw no me
bokan 2017/07/18 19:39:43 Great, thanks! From the WebNode you can get a WebD
126 return nullptr;
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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 // Called by client to request showing the context menu. 235 // Called by client to request showing the context menu.
229 virtual void ShowContextMenu(WebMenuSourceType) {} 236 virtual void ShowContextMenu(WebMenuSourceType) {}
230 237
231 protected: 238 protected:
232 ~WebWidget() {} 239 ~WebWidget() {}
233 }; 240 };
234 241
235 } // namespace blink 242 } // namespace blink
236 243
237 #endif 244 #endif
OLDNEW
« content/common/input/input_handler.mojom ('K') | « third_party/WebKit/public/web/WebView.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698