OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 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 class WebDevToolsAgentPrivate; | 76 class WebDevToolsAgentPrivate; |
77 class WebLocalFrameImpl; | 77 class WebLocalFrameImpl; |
78 class WebRemoteFrameImpl; | 78 class WebRemoteFrameImpl; |
79 class WebImage; | 79 class WebImage; |
80 class WebPagePopupImpl; | 80 class WebPagePopupImpl; |
81 class WebPlugin; | 81 class WebPlugin; |
82 class WebSettingsImpl; | 82 class WebSettingsImpl; |
83 | 83 |
84 struct WebSelectionBound; | 84 struct WebSelectionBound; |
85 | 85 |
86 class WebViewImpl FINAL : public WebView | 86 class WebViewImpl final : public WebView |
87 , public RefCounted<WebViewImpl> | 87 , public RefCounted<WebViewImpl> |
88 , public WebGestureCurveTarget | 88 , public WebGestureCurveTarget |
89 , public PagePopupDriver | 89 , public PagePopupDriver |
90 , public PageWidgetEventHandler { | 90 , public PageWidgetEventHandler { |
91 public: | 91 public: |
92 static WebViewImpl* create(WebViewClient*); | 92 static WebViewImpl* create(WebViewClient*); |
93 | 93 |
94 // WebWidget methods: | 94 // WebWidget methods: |
95 virtual void close() OVERRIDE; | 95 virtual void close() override; |
96 virtual WebSize size() OVERRIDE; | 96 virtual WebSize size() override; |
97 virtual void willStartLiveResize() OVERRIDE; | 97 virtual void willStartLiveResize() override; |
98 virtual void resize(const WebSize&) OVERRIDE; | 98 virtual void resize(const WebSize&) override; |
99 virtual void resizePinchViewport(const WebSize&) OVERRIDE; | 99 virtual void resizePinchViewport(const WebSize&) override; |
100 virtual void willEndLiveResize() OVERRIDE; | 100 virtual void willEndLiveResize() override; |
101 virtual void didEnterFullScreen() OVERRIDE; | 101 virtual void didEnterFullScreen() override; |
102 virtual void didExitFullScreen() OVERRIDE; | 102 virtual void didExitFullScreen() override; |
103 | 103 |
104 virtual void beginFrame(const WebBeginFrameArgs&) OVERRIDE; | 104 virtual void beginFrame(const WebBeginFrameArgs&) override; |
105 virtual void didCommitFrameToCompositor() OVERRIDE; | 105 virtual void didCommitFrameToCompositor() override; |
106 | 106 |
107 virtual void layout() OVERRIDE; | 107 virtual void layout() override; |
108 virtual void paint(WebCanvas*, const WebRect&) OVERRIDE; | 108 virtual void paint(WebCanvas*, const WebRect&) override; |
109 #if OS(ANDROID) | 109 #if OS(ANDROID) |
110 virtual void paintCompositedDeprecated(WebCanvas*, const WebRect&) OVERRIDE; | 110 virtual void paintCompositedDeprecated(WebCanvas*, const WebRect&) override; |
111 #endif | 111 #endif |
112 virtual void compositeAndReadbackAsync(WebCompositeAndReadbackAsyncCallback*
) OVERRIDE; | 112 virtual void compositeAndReadbackAsync(WebCompositeAndReadbackAsyncCallback*
) override; |
113 virtual bool isTrackingRepaints() const OVERRIDE; | 113 virtual bool isTrackingRepaints() const override; |
114 virtual void themeChanged() OVERRIDE; | 114 virtual void themeChanged() override; |
115 virtual bool handleInputEvent(const WebInputEvent&) OVERRIDE; | 115 virtual bool handleInputEvent(const WebInputEvent&) override; |
116 virtual void setCursorVisibilityState(bool isVisible) OVERRIDE; | 116 virtual void setCursorVisibilityState(bool isVisible) override; |
117 virtual bool hasTouchEventHandlersAt(const WebPoint&) OVERRIDE; | 117 virtual bool hasTouchEventHandlersAt(const WebPoint&) override; |
118 | 118 |
119 // FIXME(bokan): Old pinch path only - This should be removed once old pinch | 119 // FIXME(bokan): Old pinch path only - This should be removed once old pinch |
120 // is removed. | 120 // is removed. |
121 virtual void applyViewportDeltas( | 121 virtual void applyViewportDeltas( |
122 const WebSize& scrollDelta, | 122 const WebSize& scrollDelta, |
123 float pageScaleDelta, | 123 float pageScaleDelta, |
124 float topControlsDelta) OVERRIDE; | 124 float topControlsDelta) override; |
125 virtual void applyViewportDeltas( | 125 virtual void applyViewportDeltas( |
126 const WebSize& pinchViewportDelta, | 126 const WebSize& pinchViewportDelta, |
127 const WebSize& mainFrameDelta, | 127 const WebSize& mainFrameDelta, |
128 float pageScaleDelta, | 128 float pageScaleDelta, |
129 float topControlsDelta) OVERRIDE; | 129 float topControlsDelta) override; |
130 virtual void mouseCaptureLost() OVERRIDE; | 130 virtual void mouseCaptureLost() override; |
131 virtual void setFocus(bool enable) OVERRIDE; | 131 virtual void setFocus(bool enable) override; |
132 virtual bool setComposition( | 132 virtual bool setComposition( |
133 const WebString& text, | 133 const WebString& text, |
134 const WebVector<WebCompositionUnderline>& underlines, | 134 const WebVector<WebCompositionUnderline>& underlines, |
135 int selectionStart, | 135 int selectionStart, |
136 int selectionEnd) OVERRIDE; | 136 int selectionEnd) override; |
137 virtual bool confirmComposition() OVERRIDE; | 137 virtual bool confirmComposition() override; |
138 virtual bool confirmComposition(ConfirmCompositionBehavior selectionBehavior
) OVERRIDE; | 138 virtual bool confirmComposition(ConfirmCompositionBehavior selectionBehavior
) override; |
139 virtual bool confirmComposition(const WebString& text) OVERRIDE; | 139 virtual bool confirmComposition(const WebString& text) override; |
140 virtual bool compositionRange(size_t* location, size_t* length) OVERRIDE; | 140 virtual bool compositionRange(size_t* location, size_t* length) override; |
141 virtual WebTextInputInfo textInputInfo() OVERRIDE; | 141 virtual WebTextInputInfo textInputInfo() override; |
142 virtual WebColor backgroundColor() const OVERRIDE; | 142 virtual WebColor backgroundColor() const override; |
143 virtual WebPagePopup* pagePopup() const OVERRIDE; | 143 virtual WebPagePopup* pagePopup() const override; |
144 virtual bool selectionBounds(WebRect& anchor, WebRect& focus) const OVERRIDE
; | 144 virtual bool selectionBounds(WebRect& anchor, WebRect& focus) const override
; |
145 virtual void didShowCandidateWindow() OVERRIDE; | 145 virtual void didShowCandidateWindow() override; |
146 virtual void didUpdateCandidateWindow() OVERRIDE; | 146 virtual void didUpdateCandidateWindow() override; |
147 virtual void didHideCandidateWindow() OVERRIDE; | 147 virtual void didHideCandidateWindow() override; |
148 virtual bool selectionTextDirection(WebTextDirection& start, WebTextDirectio
n& end) const OVERRIDE; | 148 virtual bool selectionTextDirection(WebTextDirection& start, WebTextDirectio
n& end) const override; |
149 virtual bool isSelectionAnchorFirst() const OVERRIDE; | 149 virtual bool isSelectionAnchorFirst() const override; |
150 virtual bool caretOrSelectionRange(size_t* location, size_t* length) OVERRID
E; | 150 virtual bool caretOrSelectionRange(size_t* location, size_t* length) overrid
e; |
151 virtual void setTextDirection(WebTextDirection) OVERRIDE; | 151 virtual void setTextDirection(WebTextDirection) override; |
152 virtual bool isAcceleratedCompositingActive() const OVERRIDE; | 152 virtual bool isAcceleratedCompositingActive() const override; |
153 virtual void willCloseLayerTreeView() OVERRIDE; | 153 virtual void willCloseLayerTreeView() override; |
154 virtual void didAcquirePointerLock() OVERRIDE; | 154 virtual void didAcquirePointerLock() override; |
155 virtual void didNotAcquirePointerLock() OVERRIDE; | 155 virtual void didNotAcquirePointerLock() override; |
156 virtual void didLosePointerLock() OVERRIDE; | 156 virtual void didLosePointerLock() override; |
157 virtual void didChangeWindowResizerRect() OVERRIDE; | 157 virtual void didChangeWindowResizerRect() override; |
158 | 158 |
159 // WebView methods: | 159 // WebView methods: |
160 virtual void setMainFrame(WebFrame*) OVERRIDE; | 160 virtual void setMainFrame(WebFrame*) override; |
161 virtual void setAutofillClient(WebAutofillClient*) OVERRIDE; | 161 virtual void setAutofillClient(WebAutofillClient*) override; |
162 virtual void setCredentialManagerClient(WebCredentialManagerClient*) OVERRID
E; | 162 virtual void setCredentialManagerClient(WebCredentialManagerClient*) overrid
e; |
163 virtual void setDevToolsAgentClient(WebDevToolsAgentClient*) OVERRIDE; | 163 virtual void setDevToolsAgentClient(WebDevToolsAgentClient*) override; |
164 virtual void setPrerendererClient(WebPrerendererClient*) OVERRIDE; | 164 virtual void setPrerendererClient(WebPrerendererClient*) override; |
165 virtual void setSpellCheckClient(WebSpellCheckClient*) OVERRIDE; | 165 virtual void setSpellCheckClient(WebSpellCheckClient*) override; |
166 virtual WebSettings* settings() OVERRIDE; | 166 virtual WebSettings* settings() override; |
167 virtual WebString pageEncoding() const OVERRIDE; | 167 virtual WebString pageEncoding() const override; |
168 virtual void setPageEncoding(const WebString&) OVERRIDE; | 168 virtual void setPageEncoding(const WebString&) override; |
169 virtual bool isTransparent() const OVERRIDE; | 169 virtual bool isTransparent() const override; |
170 virtual void setIsTransparent(bool value) OVERRIDE; | 170 virtual void setIsTransparent(bool value) override; |
171 virtual void setBaseBackgroundColor(WebColor) OVERRIDE; | 171 virtual void setBaseBackgroundColor(WebColor) override; |
172 virtual bool tabsToLinks() const OVERRIDE; | 172 virtual bool tabsToLinks() const override; |
173 virtual void setTabsToLinks(bool value) OVERRIDE; | 173 virtual void setTabsToLinks(bool value) override; |
174 virtual bool tabKeyCyclesThroughElements() const OVERRIDE; | 174 virtual bool tabKeyCyclesThroughElements() const override; |
175 virtual void setTabKeyCyclesThroughElements(bool value) OVERRIDE; | 175 virtual void setTabKeyCyclesThroughElements(bool value) override; |
176 virtual bool isActive() const OVERRIDE; | 176 virtual bool isActive() const override; |
177 virtual void setIsActive(bool value) OVERRIDE; | 177 virtual void setIsActive(bool value) override; |
178 virtual void setDomainRelaxationForbidden(bool, const WebString& scheme) OVE
RRIDE; | 178 virtual void setDomainRelaxationForbidden(bool, const WebString& scheme) ove
rride; |
179 virtual void setWindowFeatures(const WebWindowFeatures&) OVERRIDE; | 179 virtual void setWindowFeatures(const WebWindowFeatures&) override; |
180 virtual void setOpenedByDOM() OVERRIDE; | 180 virtual void setOpenedByDOM() override; |
181 virtual WebFrame* mainFrame() OVERRIDE; | 181 virtual WebFrame* mainFrame() override; |
182 virtual WebFrame* findFrameByName( | 182 virtual WebFrame* findFrameByName( |
183 const WebString& name, WebFrame* relativeToFrame) OVERRIDE; | 183 const WebString& name, WebFrame* relativeToFrame) override; |
184 virtual WebFrame* focusedFrame() OVERRIDE; | 184 virtual WebFrame* focusedFrame() override; |
185 virtual void setFocusedFrame(WebFrame*) OVERRIDE; | 185 virtual void setFocusedFrame(WebFrame*) override; |
186 virtual void setInitialFocus(bool reverse) OVERRIDE; | 186 virtual void setInitialFocus(bool reverse) override; |
187 virtual void clearFocusedElement() OVERRIDE; | 187 virtual void clearFocusedElement() override; |
188 virtual void scrollFocusedNodeIntoRect(const WebRect&) OVERRIDE; | 188 virtual void scrollFocusedNodeIntoRect(const WebRect&) override; |
189 virtual void zoomToFindInPageRect(const WebRect&) OVERRIDE; | 189 virtual void zoomToFindInPageRect(const WebRect&) override; |
190 virtual void advanceFocus(bool reverse) OVERRIDE; | 190 virtual void advanceFocus(bool reverse) override; |
191 virtual double zoomLevel() OVERRIDE; | 191 virtual double zoomLevel() override; |
192 virtual double setZoomLevel(double) OVERRIDE; | 192 virtual double setZoomLevel(double) override; |
193 virtual void zoomLimitsChanged(double minimumZoomLevel, double maximumZoomLe
vel) OVERRIDE; | 193 virtual void zoomLimitsChanged(double minimumZoomLevel, double maximumZoomLe
vel) override; |
194 virtual float textZoomFactor() OVERRIDE; | 194 virtual float textZoomFactor() override; |
195 virtual float setTextZoomFactor(float) OVERRIDE; | 195 virtual float setTextZoomFactor(float) override; |
196 virtual void setInitialPageScaleOverride(float) OVERRIDE; | 196 virtual void setInitialPageScaleOverride(float) override; |
197 virtual bool zoomToMultipleTargetsRect(const WebRect&) OVERRIDE; | 197 virtual bool zoomToMultipleTargetsRect(const WebRect&) override; |
198 virtual float pageScaleFactor() const OVERRIDE; | 198 virtual float pageScaleFactor() const override; |
199 virtual void setPageScaleFactorLimits(float minPageScale, float maxPageScale
) OVERRIDE; | 199 virtual void setPageScaleFactorLimits(float minPageScale, float maxPageScale
) override; |
200 virtual void setMainFrameScrollOffset(const WebPoint&) OVERRIDE; | 200 virtual void setMainFrameScrollOffset(const WebPoint&) override; |
201 virtual void setPageScaleFactor(float) OVERRIDE; | 201 virtual void setPageScaleFactor(float) override; |
202 virtual void setPinchViewportOffset(const WebFloatPoint&) OVERRIDE; | 202 virtual void setPinchViewportOffset(const WebFloatPoint&) override; |
203 virtual WebFloatPoint pinchViewportOffset() const OVERRIDE; | 203 virtual WebFloatPoint pinchViewportOffset() const override; |
204 virtual float minimumPageScaleFactor() const OVERRIDE; | 204 virtual float minimumPageScaleFactor() const override; |
205 virtual float maximumPageScaleFactor() const OVERRIDE; | 205 virtual float maximumPageScaleFactor() const override; |
206 virtual void resetScrollAndScaleState() OVERRIDE; | 206 virtual void resetScrollAndScaleState() override; |
207 virtual void setIgnoreViewportTagScaleLimits(bool) OVERRIDE; | 207 virtual void setIgnoreViewportTagScaleLimits(bool) override; |
208 virtual WebSize contentsPreferredMinimumSize() OVERRIDE; | 208 virtual WebSize contentsPreferredMinimumSize() override; |
209 | 209 |
210 virtual float deviceScaleFactor() const OVERRIDE; | 210 virtual float deviceScaleFactor() const override; |
211 virtual void setDeviceScaleFactor(float) OVERRIDE; | 211 virtual void setDeviceScaleFactor(float) override; |
212 virtual void setDeviceColorProfile(const WebVector<char>&) OVERRIDE; | 212 virtual void setDeviceColorProfile(const WebVector<char>&) override; |
213 virtual void resetDeviceColorProfile() OVERRIDE; | 213 virtual void resetDeviceColorProfile() override; |
214 | 214 |
215 virtual void enableAutoResizeMode( | 215 virtual void enableAutoResizeMode( |
216 const WebSize& minSize, | 216 const WebSize& minSize, |
217 const WebSize& maxSize) OVERRIDE; | 217 const WebSize& maxSize) override; |
218 virtual void disableAutoResizeMode() OVERRIDE; | 218 virtual void disableAutoResizeMode() override; |
219 virtual void performMediaPlayerAction( | 219 virtual void performMediaPlayerAction( |
220 const WebMediaPlayerAction& action, | 220 const WebMediaPlayerAction& action, |
221 const WebPoint& location) OVERRIDE; | 221 const WebPoint& location) override; |
222 virtual void performPluginAction( | 222 virtual void performPluginAction( |
223 const WebPluginAction&, | 223 const WebPluginAction&, |
224 const WebPoint&) OVERRIDE; | 224 const WebPoint&) override; |
225 virtual WebHitTestResult hitTestResultAt(const WebPoint&) OVERRIDE; | 225 virtual WebHitTestResult hitTestResultAt(const WebPoint&) override; |
226 virtual void copyImageAt(const WebPoint&) OVERRIDE; | 226 virtual void copyImageAt(const WebPoint&) override; |
227 virtual void saveImageAt(const WebPoint&) OVERRIDE; | 227 virtual void saveImageAt(const WebPoint&) override; |
228 virtual void dragSourceEndedAt( | 228 virtual void dragSourceEndedAt( |
229 const WebPoint& clientPoint, | 229 const WebPoint& clientPoint, |
230 const WebPoint& screenPoint, | 230 const WebPoint& screenPoint, |
231 WebDragOperation) OVERRIDE; | 231 WebDragOperation) override; |
232 virtual void dragSourceSystemDragEnded() OVERRIDE; | 232 virtual void dragSourceSystemDragEnded() override; |
233 virtual WebDragOperation dragTargetDragEnter( | 233 virtual WebDragOperation dragTargetDragEnter( |
234 const WebDragData&, | 234 const WebDragData&, |
235 const WebPoint& clientPoint, | 235 const WebPoint& clientPoint, |
236 const WebPoint& screenPoint, | 236 const WebPoint& screenPoint, |
237 WebDragOperationsMask operationsAllowed, | 237 WebDragOperationsMask operationsAllowed, |
238 int keyModifiers) OVERRIDE; | 238 int keyModifiers) override; |
239 virtual WebDragOperation dragTargetDragOver( | 239 virtual WebDragOperation dragTargetDragOver( |
240 const WebPoint& clientPoint, | 240 const WebPoint& clientPoint, |
241 const WebPoint& screenPoint, | 241 const WebPoint& screenPoint, |
242 WebDragOperationsMask operationsAllowed, | 242 WebDragOperationsMask operationsAllowed, |
243 int keyModifiers) OVERRIDE; | 243 int keyModifiers) override; |
244 virtual void dragTargetDragLeave() OVERRIDE; | 244 virtual void dragTargetDragLeave() override; |
245 virtual void dragTargetDrop( | 245 virtual void dragTargetDrop( |
246 const WebPoint& clientPoint, | 246 const WebPoint& clientPoint, |
247 const WebPoint& screenPoint, | 247 const WebPoint& screenPoint, |
248 int keyModifiers) OVERRIDE; | 248 int keyModifiers) override; |
249 virtual void spellingMarkers(WebVector<uint32_t>* markers) OVERRIDE; | 249 virtual void spellingMarkers(WebVector<uint32_t>* markers) override; |
250 virtual void removeSpellingMarkersUnderWords(const WebVector<WebString>& wor
ds) OVERRIDE; | 250 virtual void removeSpellingMarkersUnderWords(const WebVector<WebString>& wor
ds) override; |
251 virtual unsigned long createUniqueIdentifierForRequest() OVERRIDE; | 251 virtual unsigned long createUniqueIdentifierForRequest() override; |
252 virtual void inspectElementAt(const WebPoint&) OVERRIDE; | 252 virtual void inspectElementAt(const WebPoint&) override; |
253 virtual void setCompositorDeviceScaleFactorOverride(float) OVERRIDE; | 253 virtual void setCompositorDeviceScaleFactorOverride(float) override; |
254 virtual void setRootLayerTransform(const WebSize& offset, float scale) OVERR
IDE; | 254 virtual void setRootLayerTransform(const WebSize& offset, float scale) overr
ide; |
255 virtual WebDevToolsAgent* devToolsAgent() OVERRIDE; | 255 virtual WebDevToolsAgent* devToolsAgent() override; |
256 virtual WebAXObject accessibilityObject() OVERRIDE; | 256 virtual WebAXObject accessibilityObject() override; |
257 virtual void setSelectionColors(unsigned activeBackgroundColor, | 257 virtual void setSelectionColors(unsigned activeBackgroundColor, |
258 unsigned activeForegroundColor, | 258 unsigned activeForegroundColor, |
259 unsigned inactiveBackgroundColor, | 259 unsigned inactiveBackgroundColor, |
260 unsigned inactiveForegroundColor) OVERRIDE; | 260 unsigned inactiveForegroundColor) override; |
261 virtual void performCustomContextMenuAction(unsigned action) OVERRIDE; | 261 virtual void performCustomContextMenuAction(unsigned action) override; |
262 virtual void showContextMenu() OVERRIDE; | 262 virtual void showContextMenu() override; |
263 virtual void extractSmartClipData(WebRect, WebString&, WebString&, WebRect&)
OVERRIDE; | 263 virtual void extractSmartClipData(WebRect, WebString&, WebString&, WebRect&)
override; |
264 virtual void hidePopups() OVERRIDE; | 264 virtual void hidePopups() override; |
265 virtual void addPageOverlay(WebPageOverlay*, int /* zOrder */) OVERRIDE; | 265 virtual void addPageOverlay(WebPageOverlay*, int /* zOrder */) override; |
266 virtual void removePageOverlay(WebPageOverlay*) OVERRIDE; | 266 virtual void removePageOverlay(WebPageOverlay*) override; |
267 virtual void transferActiveWheelFlingAnimation(const WebActiveWheelFlingPara
meters&) OVERRIDE; | 267 virtual void transferActiveWheelFlingAnimation(const WebActiveWheelFlingPara
meters&) override; |
268 virtual bool endActiveFlingAnimation() OVERRIDE; | 268 virtual bool endActiveFlingAnimation() override; |
269 virtual void setShowPaintRects(bool) OVERRIDE; | 269 virtual void setShowPaintRects(bool) override; |
270 void setShowDebugBorders(bool); | 270 void setShowDebugBorders(bool); |
271 virtual void setShowFPSCounter(bool) OVERRIDE; | 271 virtual void setShowFPSCounter(bool) override; |
272 virtual void setContinuousPaintingEnabled(bool) OVERRIDE; | 272 virtual void setContinuousPaintingEnabled(bool) override; |
273 virtual void setShowScrollBottleneckRects(bool) OVERRIDE; | 273 virtual void setShowScrollBottleneckRects(bool) override; |
274 virtual void getSelectionRootBounds(WebRect& bounds) const OVERRIDE; | 274 virtual void getSelectionRootBounds(WebRect& bounds) const override; |
275 virtual void acceptLanguagesChanged() OVERRIDE; | 275 virtual void acceptLanguagesChanged() override; |
276 | 276 |
277 // WebViewImpl | 277 // WebViewImpl |
278 | 278 |
279 HitTestResult coreHitTestResultAt(const WebPoint&); | 279 HitTestResult coreHitTestResultAt(const WebPoint&); |
280 void suppressInvalidations(bool enable); | 280 void suppressInvalidations(bool enable); |
281 void invalidateRect(const IntRect&); | 281 void invalidateRect(const IntRect&); |
282 | 282 |
283 void setIgnoreInputEvents(bool newValue); | 283 void setIgnoreInputEvents(bool newValue); |
284 void setBackgroundColorOverride(WebColor); | 284 void setBackgroundColorOverride(WebColor); |
285 void setZoomFactorOverride(float); | 285 void setZoomFactorOverride(float); |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 // Event related methods: | 336 // Event related methods: |
337 void mouseContextMenu(const WebMouseEvent&); | 337 void mouseContextMenu(const WebMouseEvent&); |
338 void mouseDoubleClick(const WebMouseEvent&); | 338 void mouseDoubleClick(const WebMouseEvent&); |
339 | 339 |
340 bool detectContentOnTouch(const GestureEventWithHitTestResults& targetedEven
t); | 340 bool detectContentOnTouch(const GestureEventWithHitTestResults& targetedEven
t); |
341 bool startPageScaleAnimation(const IntPoint& targetPosition, bool useAnchor,
float newScale, double durationInSeconds); | 341 bool startPageScaleAnimation(const IntPoint& targetPosition, bool useAnchor,
float newScale, double durationInSeconds); |
342 | 342 |
343 void hasTouchEventHandlers(bool); | 343 void hasTouchEventHandlers(bool); |
344 | 344 |
345 // WebGestureCurveTarget implementation for fling. | 345 // WebGestureCurveTarget implementation for fling. |
346 virtual bool scrollBy(const WebFloatSize& delta, const WebFloatSize& velocit
y) OVERRIDE; | 346 virtual bool scrollBy(const WebFloatSize& delta, const WebFloatSize& velocit
y) override; |
347 | 347 |
348 // Handles context menu events orignated via the the keyboard. These | 348 // Handles context menu events orignated via the the keyboard. These |
349 // include the VK_APPS virtual key and the Shift+F10 combine. Code is | 349 // include the VK_APPS virtual key and the Shift+F10 combine. Code is |
350 // based on the Webkit function bool WebView::handleContextMenuEvent(WPARAM | 350 // based on the Webkit function bool WebView::handleContextMenuEvent(WPARAM |
351 // wParam, LPARAM lParam) in webkit\webkit\win\WebView.cpp. The only | 351 // wParam, LPARAM lParam) in webkit\webkit\win\WebView.cpp. The only |
352 // significant change in this function is the code to convert from a | 352 // significant change in this function is the code to convert from a |
353 // Keyboard event to the Right Mouse button down event. | 353 // Keyboard event to the Right Mouse button down event. |
354 bool sendContextMenuEvent(const WebKeyboardEvent&); | 354 bool sendContextMenuEvent(const WebKeyboardEvent&); |
355 | 355 |
356 void showContextMenuAtPoint(float x, float y, PassRefPtr<ContextMenuProvider
>); | 356 void showContextMenuAtPoint(float x, float y, PassRefPtr<ContextMenuProvider
>); |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
405 LocalFrame*, | 405 LocalFrame*, |
406 const WebDragData& dragData, | 406 const WebDragData& dragData, |
407 WebDragOperationsMask mask, | 407 WebDragOperationsMask mask, |
408 const WebImage& dragImage, | 408 const WebImage& dragImage, |
409 const WebPoint& dragImageOffset); | 409 const WebPoint& dragImageOffset); |
410 | 410 |
411 // Notification that a popup was opened/closed. | 411 // Notification that a popup was opened/closed. |
412 void popupOpened(PopupContainer*); | 412 void popupOpened(PopupContainer*); |
413 void popupClosed(PopupContainer*); | 413 void popupClosed(PopupContainer*); |
414 // PagePopupDriver functions. | 414 // PagePopupDriver functions. |
415 virtual PagePopup* openPagePopup(PagePopupClient*, const IntRect& originBoun
dsInRootView) OVERRIDE; | 415 virtual PagePopup* openPagePopup(PagePopupClient*, const IntRect& originBoun
dsInRootView) override; |
416 virtual void closePagePopup(PagePopup*) OVERRIDE; | 416 virtual void closePagePopup(PagePopup*) override; |
417 virtual LocalDOMWindow* pagePopupWindow() OVERRIDE; | 417 virtual LocalDOMWindow* pagePopupWindow() override; |
418 | 418 |
419 // Returns the input event we're currently processing. This is used in some | 419 // Returns the input event we're currently processing. This is used in some |
420 // cases where the WebCore DOM event doesn't have the information we need. | 420 // cases where the WebCore DOM event doesn't have the information we need. |
421 static const WebInputEvent* currentInputEvent() | 421 static const WebInputEvent* currentInputEvent() |
422 { | 422 { |
423 return m_currentInputEvent; | 423 return m_currentInputEvent; |
424 } | 424 } |
425 | 425 |
426 GraphicsLayer* rootGraphicsLayer(); | 426 GraphicsLayer* rootGraphicsLayer(); |
427 void setRootGraphicsLayer(GraphicsLayer*); | 427 void setRootGraphicsLayer(GraphicsLayer*); |
428 void scheduleCompositingLayerSync(); | 428 void scheduleCompositingLayerSync(); |
429 GraphicsLayerFactory* graphicsLayerFactory() const; | 429 GraphicsLayerFactory* graphicsLayerFactory() const; |
430 RenderLayerCompositor* compositor() const; | 430 RenderLayerCompositor* compositor() const; |
431 void registerForAnimations(WebLayer*); | 431 void registerForAnimations(WebLayer*); |
432 void scheduleAnimation(); | 432 void scheduleAnimation(); |
433 | 433 |
434 virtual void setVisibilityState(WebPageVisibilityState, bool) OVERRIDE; | 434 virtual void setVisibilityState(WebPageVisibilityState, bool) override; |
435 | 435 |
436 PopupContainer* selectPopup() const { return m_selectPopup.get(); } | 436 PopupContainer* selectPopup() const { return m_selectPopup.get(); } |
437 bool hasOpenedPopup() const { return m_selectPopup || m_pagePopup; } | 437 bool hasOpenedPopup() const { return m_selectPopup || m_pagePopup; } |
438 | 438 |
439 // Returns true if the event leads to scrolling. | 439 // Returns true if the event leads to scrolling. |
440 static bool mapKeyCodeForScroll( | 440 static bool mapKeyCodeForScroll( |
441 int keyCode, | 441 int keyCode, |
442 ScrollDirection*, | 442 ScrollDirection*, |
443 ScrollGranularity*); | 443 ScrollGranularity*); |
444 | 444 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
500 | 500 |
501 // Exposed for tests. | 501 // Exposed for tests. |
502 WebVector<WebCompositionUnderline> compositionUnderlines() const; | 502 WebVector<WebCompositionUnderline> compositionUnderlines() const; |
503 | 503 |
504 WebLayerTreeView* layerTreeView() const { return m_layerTreeView; } | 504 WebLayerTreeView* layerTreeView() const { return m_layerTreeView; } |
505 | 505 |
506 bool pinchVirtualViewportEnabled() const; | 506 bool pinchVirtualViewportEnabled() const; |
507 | 507 |
508 bool matchesHeuristicsForGpuRasterizationForTesting() const { return m_match
esHeuristicsForGpuRasterization; } | 508 bool matchesHeuristicsForGpuRasterizationForTesting() const { return m_match
esHeuristicsForGpuRasterization; } |
509 | 509 |
510 virtual void setTopControlsLayoutHeight(float) OVERRIDE; | 510 virtual void setTopControlsLayoutHeight(float) override; |
511 | 511 |
512 private: | 512 private: |
513 void didUpdateTopControls(); | 513 void didUpdateTopControls(); |
514 void setTopControlsContentOffset(float); | 514 void setTopControlsContentOffset(float); |
515 | 515 |
516 // TODO(bokan): Remains for legacy pinch. Remove once it's gone. Made privat
e to | 516 // TODO(bokan): Remains for legacy pinch. Remove once it's gone. Made privat
e to |
517 // prevent external usage | 517 // prevent external usage |
518 virtual void setPageScaleFactor(float scaleFactor, const WebPoint& origin) O
VERRIDE; | 518 virtual void setPageScaleFactor(float scaleFactor, const WebPoint& origin) o
verride; |
519 void setPageScaleFactorAndLocation(float, const FloatPoint&); | 519 void setPageScaleFactorAndLocation(float, const FloatPoint&); |
520 | 520 |
521 void scrollAndRescaleViewports(float scaleFactor, const IntPoint& mainFrameO
rigin, const FloatPoint& pinchViewportOrigin); | 521 void scrollAndRescaleViewports(float scaleFactor, const IntPoint& mainFrameO
rigin, const FloatPoint& pinchViewportOrigin); |
522 | 522 |
523 IntRect visibleRectInDocument() const; | 523 IntRect visibleRectInDocument() const; |
524 | 524 |
525 float legibleScale() const; | 525 float legibleScale() const; |
526 void refreshPageScaleFactorAfterLayout(); | 526 void refreshPageScaleFactorAfterLayout(); |
527 void resumeTreeViewCommits(); | 527 void resumeTreeViewCommits(); |
528 void setUserAgentPageScaleConstraints(PageScaleConstraints newConstraints); | 528 void setUserAgentPageScaleConstraints(PageScaleConstraints newConstraints); |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
586 void updateRootLayerTransform(); | 586 void updateRootLayerTransform(); |
587 void updateLayerTreeDeviceScaleFactor(); | 587 void updateLayerTreeDeviceScaleFactor(); |
588 | 588 |
589 // Helper function: Widens the width of |source| by the specified margins | 589 // Helper function: Widens the width of |source| by the specified margins |
590 // while keeping it smaller than page width. | 590 // while keeping it smaller than page width. |
591 WebRect widenRectWithinPageBounds(const WebRect& source, int targetMargin, i
nt minimumMargin); | 591 WebRect widenRectWithinPageBounds(const WebRect& source, int targetMargin, i
nt minimumMargin); |
592 | 592 |
593 void pointerLockMouseEvent(const WebInputEvent&); | 593 void pointerLockMouseEvent(const WebInputEvent&); |
594 | 594 |
595 // PageWidgetEventHandler functions | 595 // PageWidgetEventHandler functions |
596 virtual void handleMouseLeave(LocalFrame&, const WebMouseEvent&) OVERRIDE; | 596 virtual void handleMouseLeave(LocalFrame&, const WebMouseEvent&) override; |
597 virtual void handleMouseDown(LocalFrame&, const WebMouseEvent&) OVERRIDE; | 597 virtual void handleMouseDown(LocalFrame&, const WebMouseEvent&) override; |
598 virtual void handleMouseUp(LocalFrame&, const WebMouseEvent&) OVERRIDE; | 598 virtual void handleMouseUp(LocalFrame&, const WebMouseEvent&) override; |
599 virtual bool handleMouseWheel(LocalFrame&, const WebMouseWheelEvent&) OVERRI
DE; | 599 virtual bool handleMouseWheel(LocalFrame&, const WebMouseWheelEvent&) overri
de; |
600 virtual bool handleGestureEvent(const WebGestureEvent&) OVERRIDE; | 600 virtual bool handleGestureEvent(const WebGestureEvent&) override; |
601 virtual bool handleKeyEvent(const WebKeyboardEvent&) OVERRIDE; | 601 virtual bool handleKeyEvent(const WebKeyboardEvent&) override; |
602 virtual bool handleCharEvent(const WebKeyboardEvent&) OVERRIDE; | 602 virtual bool handleCharEvent(const WebKeyboardEvent&) override; |
603 | 603 |
604 InputMethodContext* inputMethodContext(); | 604 InputMethodContext* inputMethodContext(); |
605 WebPlugin* focusedPluginIfInputMethodSupported(LocalFrame*); | 605 WebPlugin* focusedPluginIfInputMethodSupported(LocalFrame*); |
606 | 606 |
607 WebViewClient* m_client; // Can be 0 (e.g. unittests, shared workers, etc.) | 607 WebViewClient* m_client; // Can be 0 (e.g. unittests, shared workers, etc.) |
608 WebAutofillClient* m_autofillClient; | 608 WebAutofillClient* m_autofillClient; |
609 WebSpellCheckClient* m_spellCheckClient; | 609 WebSpellCheckClient* m_spellCheckClient; |
610 | 610 |
611 ChromeClientImpl m_chromeClientImpl; | 611 ChromeClientImpl m_chromeClientImpl; |
612 ContextMenuClientImpl m_contextMenuClientImpl; | 612 ContextMenuClientImpl m_contextMenuClientImpl; |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
755 float m_topControlsLayoutHeight; | 755 float m_topControlsLayoutHeight; |
756 }; | 756 }; |
757 | 757 |
758 // We have no ways to check if the specified WebView is an instance of | 758 // We have no ways to check if the specified WebView is an instance of |
759 // WebViewImpl because WebViewImpl is the only implementation of WebView. | 759 // WebViewImpl because WebViewImpl is the only implementation of WebView. |
760 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true); | 760 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true); |
761 | 761 |
762 } // namespace blink | 762 } // namespace blink |
763 | 763 |
764 #endif | 764 #endif |
OLD | NEW |