OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 void resizeVisualViewport(const WebSize&) override; | 76 void resizeVisualViewport(const WebSize&) override; |
77 void willEndLiveResize() override; | 77 void willEndLiveResize() override; |
78 void didEnterFullScreen() override; | 78 void didEnterFullScreen() override; |
79 void didExitFullScreen() override; | 79 void didExitFullScreen() override; |
80 void beginFrame(double lastFrameTimeMonotonic) override; | 80 void beginFrame(double lastFrameTimeMonotonic) override; |
81 void updateAllLifecyclePhases() override; | 81 void updateAllLifecyclePhases() override; |
82 void paint(WebCanvas*, const WebRect&) override; | 82 void paint(WebCanvas*, const WebRect&) override; |
83 void layoutAndPaintAsync(WebLayoutAndPaintAsyncCallback*) override; | 83 void layoutAndPaintAsync(WebLayoutAndPaintAsyncCallback*) override; |
84 void compositeAndReadbackAsync(WebCompositeAndReadbackAsyncCallback*) overri
de; | 84 void compositeAndReadbackAsync(WebCompositeAndReadbackAsyncCallback*) overri
de; |
85 void themeChanged() override; | 85 void themeChanged() override; |
86 bool handleInputEvent(const WebInputEvent&) override; | 86 WebInputEventResult handleInputEvent(const WebInputEvent&) override; |
87 void setCursorVisibilityState(bool isVisible) override; | 87 void setCursorVisibilityState(bool isVisible) override; |
88 bool hasTouchEventHandlersAt(const WebPoint&) override; | 88 bool hasTouchEventHandlersAt(const WebPoint&) override; |
89 | 89 |
90 void applyViewportDeltas( | 90 void applyViewportDeltas( |
91 const WebFloatSize& visualViewportDelta, | 91 const WebFloatSize& visualViewportDelta, |
92 const WebFloatSize& mainFrameDelta, | 92 const WebFloatSize& mainFrameDelta, |
93 const WebFloatSize& elasticOverscrollDelta, | 93 const WebFloatSize& elasticOverscrollDelta, |
94 float pageScaleDelta, | 94 float pageScaleDelta, |
95 float topControlsDelta) override; | 95 float topControlsDelta) override; |
96 void mouseCaptureLost() override; | 96 void mouseCaptureLost() override; |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 friend class WTF::RefCounted<WebFrameWidgetImpl>; | 163 friend class WTF::RefCounted<WebFrameWidgetImpl>; |
164 #endif | 164 #endif |
165 | 165 |
166 explicit WebFrameWidgetImpl(WebWidgetClient*, WebLocalFrame*); | 166 explicit WebFrameWidgetImpl(WebWidgetClient*, WebLocalFrame*); |
167 ~WebFrameWidgetImpl(); | 167 ~WebFrameWidgetImpl(); |
168 | 168 |
169 // Perform a hit test for a point relative to the root frame of the page. | 169 // Perform a hit test for a point relative to the root frame of the page. |
170 HitTestResult hitTestResultForRootFramePos(const IntPoint& posInRootFrame); | 170 HitTestResult hitTestResultForRootFramePos(const IntPoint& posInRootFrame); |
171 | 171 |
172 // Returns true if the event was actually processed. | 172 // Returns true if the event was actually processed. |
173 bool keyEventDefault(const WebKeyboardEvent&); | 173 WebInputEventResult keyEventDefault(const WebKeyboardEvent&); |
174 | 174 |
175 // Returns true if the view was scrolled. | 175 // Returns true if the view was scrolled. |
176 bool scrollViewWithKeyboard(int keyCode, int modifiers); | 176 WebInputEventResult scrollViewWithKeyboard(int keyCode, int modifiers); |
177 | 177 |
178 void initializeLayerTreeView(); | 178 void initializeLayerTreeView(); |
179 | 179 |
180 void setIsAcceleratedCompositingActive(bool); | 180 void setIsAcceleratedCompositingActive(bool); |
181 void updateLayerTreeViewport(); | 181 void updateLayerTreeViewport(); |
182 void updateLayerTreeBackgroundColor(); | 182 void updateLayerTreeBackgroundColor(); |
183 void updateLayerTreeDeviceScaleFactor(); | 183 void updateLayerTreeDeviceScaleFactor(); |
184 | 184 |
185 bool isTransparent() const; | 185 bool isTransparent() const; |
186 | 186 |
187 // PageWidgetEventHandler functions | 187 // PageWidgetEventHandler functions |
188 void handleMouseLeave(LocalFrame&, const WebMouseEvent&) override; | 188 void handleMouseLeave(LocalFrame&, const WebMouseEvent&) override; |
189 void handleMouseDown(LocalFrame&, const WebMouseEvent&) override; | 189 void handleMouseDown(LocalFrame&, const WebMouseEvent&) override; |
190 void handleMouseUp(LocalFrame&, const WebMouseEvent&) override; | 190 void handleMouseUp(LocalFrame&, const WebMouseEvent&) override; |
191 bool handleMouseWheel(LocalFrame&, const WebMouseWheelEvent&) override; | 191 WebInputEventResult handleMouseWheel(LocalFrame&, const WebMouseWheelEvent&)
override; |
192 bool handleGestureEvent(const WebGestureEvent&) override; | 192 WebInputEventResult handleGestureEvent(const WebGestureEvent&) override; |
193 bool handleKeyEvent(const WebKeyboardEvent&) override; | 193 WebInputEventResult handleKeyEvent(const WebKeyboardEvent&) override; |
194 bool handleCharEvent(const WebKeyboardEvent&) override; | 194 WebInputEventResult handleCharEvent(const WebKeyboardEvent&) override; |
195 | 195 |
196 WebViewImpl* view() const { return m_localRoot->viewImpl(); } | 196 WebViewImpl* view() const { return m_localRoot->viewImpl(); } |
197 | 197 |
198 WebWidgetClient* m_client; | 198 WebWidgetClient* m_client; |
199 | 199 |
200 // WebFrameWidget is associated with a subtree of the frame tree, correspond
ing to a maximal | 200 // WebFrameWidget is associated with a subtree of the frame tree, correspond
ing to a maximal |
201 // connected tree of LocalFrames. This member points to the root of that sub
tree. | 201 // connected tree of LocalFrames. This member points to the root of that sub
tree. |
202 RawPtrWillBeMember<WebLocalFrameImpl> m_localRoot; | 202 RawPtrWillBeMember<WebLocalFrameImpl> m_localRoot; |
203 | 203 |
204 WebSize m_size; | 204 WebSize m_size; |
(...skipping 17 matching lines...) Expand all Loading... |
222 #if ENABLE(OILPAN) | 222 #if ENABLE(OILPAN) |
223 SelfKeepAlive<WebFrameWidgetImpl> m_selfKeepAlive; | 223 SelfKeepAlive<WebFrameWidgetImpl> m_selfKeepAlive; |
224 #endif | 224 #endif |
225 }; | 225 }; |
226 | 226 |
227 DEFINE_TYPE_CASTS(WebFrameWidgetImpl, WebFrameWidget, widget, widget->forSubfram
e(), widget.forSubframe()); | 227 DEFINE_TYPE_CASTS(WebFrameWidgetImpl, WebFrameWidget, widget, widget->forSubfram
e(), widget.forSubframe()); |
228 | 228 |
229 } // namespace blink | 229 } // namespace blink |
230 | 230 |
231 #endif | 231 #endif |
OLD | NEW |