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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 class WebMouseEvent; | 106 class WebMouseEvent; |
107 class WebMouseWheelEvent; | 107 class WebMouseWheelEvent; |
108 class WebPagePopupImpl; | 108 class WebPagePopupImpl; |
109 class WebPlugin; | 109 class WebPlugin; |
110 class WebPrerendererClient; | 110 class WebPrerendererClient; |
111 class WebSettingsImpl; | 111 class WebSettingsImpl; |
112 class WebTouchEvent; | 112 class WebTouchEvent; |
113 class WorkerGlobalScopeProxyProviderImpl; | 113 class WorkerGlobalScopeProxyProviderImpl; |
114 class FullscreenController; | 114 class FullscreenController; |
115 | 115 |
116 class WebViewImpl : public WebView | 116 class WebViewImpl FINAL : public WebView |
117 , public RefCounted<WebViewImpl> | 117 , public RefCounted<WebViewImpl> |
118 , public WebGestureCurveTarget | 118 , public WebGestureCurveTarget |
119 , public WebCore::PagePopupDriver | 119 , public WebCore::PagePopupDriver |
120 , public PageWidgetEventHandler { | 120 , public PageWidgetEventHandler { |
121 public: | 121 public: |
122 static WebViewImpl* create(WebViewClient*); | 122 static WebViewImpl* create(WebViewClient*); |
123 | 123 |
124 // WebWidget methods: | 124 // WebWidget methods: |
125 virtual void close(); | 125 virtual void close() OVERRIDE; |
126 virtual WebSize size(); | 126 virtual WebSize size() OVERRIDE; |
127 virtual void willStartLiveResize(); | 127 virtual void willStartLiveResize() OVERRIDE; |
128 virtual void resize(const WebSize&); | 128 virtual void resize(const WebSize&) OVERRIDE; |
129 virtual void willEndLiveResize(); | 129 virtual void willEndLiveResize() OVERRIDE; |
130 virtual void willEnterFullScreen(); | 130 virtual void willEnterFullScreen() OVERRIDE; |
131 virtual void didEnterFullScreen(); | 131 virtual void didEnterFullScreen() OVERRIDE; |
132 virtual void willExitFullScreen(); | 132 virtual void willExitFullScreen() OVERRIDE; |
133 virtual void didExitFullScreen(); | 133 virtual void didExitFullScreen() OVERRIDE; |
134 virtual void animate(double); | 134 virtual void animate(double) OVERRIDE; |
135 virtual void layout(); | 135 virtual void layout() OVERRIDE; |
136 virtual void enterForceCompositingMode(bool enable) OVERRIDE; | 136 virtual void enterForceCompositingMode(bool enable) OVERRIDE; |
137 virtual void paint(WebCanvas*, const WebRect&, PaintOptions = ReadbackFromCo
mpositorIfAvailable); | 137 virtual void paint(WebCanvas*, const WebRect&, PaintOptions = ReadbackFromCo
mpositorIfAvailable) OVERRIDE; |
138 virtual bool isTrackingRepaints() const OVERRIDE; | 138 virtual bool isTrackingRepaints() const OVERRIDE; |
139 virtual void themeChanged(); | 139 virtual void themeChanged() OVERRIDE; |
140 virtual bool handleInputEvent(const WebInputEvent&); | 140 virtual bool handleInputEvent(const WebInputEvent&) OVERRIDE; |
141 virtual void setCursorVisibilityState(bool isVisible); | 141 virtual void setCursorVisibilityState(bool isVisible) OVERRIDE; |
142 virtual bool hasTouchEventHandlersAt(const WebPoint&); | 142 virtual bool hasTouchEventHandlersAt(const WebPoint&) OVERRIDE; |
143 virtual void applyScrollAndScale(const WebSize&, float); | 143 virtual void applyScrollAndScale(const WebSize&, float) OVERRIDE; |
144 virtual void mouseCaptureLost(); | 144 virtual void mouseCaptureLost() OVERRIDE; |
145 virtual void setFocus(bool enable); | 145 virtual void setFocus(bool enable) OVERRIDE; |
146 virtual bool setComposition( | 146 virtual bool setComposition( |
147 const WebString& text, | 147 const WebString& text, |
148 const WebVector<WebCompositionUnderline>& underlines, | 148 const WebVector<WebCompositionUnderline>& underlines, |
149 int selectionStart, | 149 int selectionStart, |
150 int selectionEnd); | 150 int selectionEnd) OVERRIDE; |
151 virtual bool confirmComposition(); | 151 virtual bool confirmComposition() OVERRIDE; |
152 virtual bool confirmComposition(ConfirmCompositionBehavior selectionBehavior
); | 152 virtual bool confirmComposition(ConfirmCompositionBehavior selectionBehavior
) OVERRIDE; |
153 virtual bool confirmComposition(const WebString& text); | 153 virtual bool confirmComposition(const WebString& text) OVERRIDE; |
154 virtual bool compositionRange(size_t* location, size_t* length); | 154 virtual bool compositionRange(size_t* location, size_t* length) OVERRIDE; |
155 virtual WebTextInputInfo textInputInfo(); | 155 virtual WebTextInputInfo textInputInfo() OVERRIDE; |
156 virtual bool setEditableSelectionOffsets(int start, int end); | 156 virtual bool setEditableSelectionOffsets(int start, int end) OVERRIDE; |
157 virtual bool setCompositionFromExistingText(int compositionStart, int compos
itionEnd, const WebVector<WebCompositionUnderline>& underlines); | 157 virtual bool setCompositionFromExistingText(int compositionStart, int compos
itionEnd, const WebVector<WebCompositionUnderline>& underlines) OVERRIDE; |
158 virtual void extendSelectionAndDelete(int before, int after); | 158 virtual void extendSelectionAndDelete(int before, int after) OVERRIDE; |
159 virtual bool isSelectionEditable() const; | 159 virtual bool isSelectionEditable() const OVERRIDE; |
160 virtual WebColor backgroundColor() const; | 160 virtual WebColor backgroundColor() const OVERRIDE; |
161 virtual bool selectionBounds(WebRect& anchor, WebRect& focus) const; | 161 virtual bool selectionBounds(WebRect& anchor, WebRect& focus) const OVERRIDE
; |
162 virtual void didShowCandidateWindow(); | 162 virtual void didShowCandidateWindow() OVERRIDE; |
163 virtual void didUpdateCandidateWindow(); | 163 virtual void didUpdateCandidateWindow() OVERRIDE; |
164 virtual void didHideCandidateWindow(); | 164 virtual void didHideCandidateWindow() OVERRIDE; |
165 virtual bool selectionTextDirection(WebTextDirection& start, WebTextDirectio
n& end) const; | 165 virtual bool selectionTextDirection(WebTextDirection& start, WebTextDirectio
n& end) const OVERRIDE; |
166 virtual bool isSelectionAnchorFirst() const; | 166 virtual bool isSelectionAnchorFirst() const OVERRIDE; |
167 virtual bool caretOrSelectionRange(size_t* location, size_t* length); | 167 virtual bool caretOrSelectionRange(size_t* location, size_t* length) OVERRID
E; |
168 virtual void setTextDirection(WebTextDirection direction); | 168 virtual void setTextDirection(WebTextDirection) OVERRIDE; |
169 virtual bool isAcceleratedCompositingActive() const; | 169 virtual bool isAcceleratedCompositingActive() const OVERRIDE; |
170 virtual void willCloseLayerTreeView(); | 170 virtual void willCloseLayerTreeView() OVERRIDE; |
171 virtual void didAcquirePointerLock(); | 171 virtual void didAcquirePointerLock() OVERRIDE; |
172 virtual void didNotAcquirePointerLock(); | 172 virtual void didNotAcquirePointerLock() OVERRIDE; |
173 virtual void didLosePointerLock(); | 173 virtual void didLosePointerLock() OVERRIDE; |
174 virtual void didChangeWindowResizerRect(); | 174 virtual void didChangeWindowResizerRect() OVERRIDE; |
175 virtual void didExitCompositingMode(); | 175 virtual void didExitCompositingMode() OVERRIDE; |
176 | 176 |
177 // WebView methods: | 177 // WebView methods: |
178 virtual void setMainFrame(WebFrame*); | 178 virtual void setMainFrame(WebFrame*) OVERRIDE; |
179 virtual void setAutofillClient(WebAutofillClient*); | 179 virtual void setAutofillClient(WebAutofillClient*) OVERRIDE; |
180 virtual void setDevToolsAgentClient(WebDevToolsAgentClient*); | 180 virtual void setDevToolsAgentClient(WebDevToolsAgentClient*) OVERRIDE; |
181 virtual void setPrerendererClient(WebPrerendererClient*) OVERRIDE; | 181 virtual void setPrerendererClient(WebPrerendererClient*) OVERRIDE; |
182 virtual void setSpellCheckClient(WebSpellCheckClient*); | 182 virtual void setSpellCheckClient(WebSpellCheckClient*) OVERRIDE; |
183 virtual void setPasswordGeneratorClient(WebPasswordGeneratorClient*) OVERRID
E; | 183 virtual void setPasswordGeneratorClient(WebPasswordGeneratorClient*) OVERRID
E; |
184 virtual WebSettings* settings(); | 184 virtual WebSettings* settings() OVERRIDE; |
185 virtual WebString pageEncoding() const; | 185 virtual WebString pageEncoding() const OVERRIDE; |
186 virtual void setPageEncoding(const WebString& encoding); | 186 virtual void setPageEncoding(const WebString&) OVERRIDE; |
187 virtual bool isTransparent() const; | 187 virtual bool isTransparent() const OVERRIDE; |
188 virtual void setIsTransparent(bool value); | 188 virtual void setIsTransparent(bool value) OVERRIDE; |
189 virtual void setBaseBackgroundColor(WebColor); | 189 virtual void setBaseBackgroundColor(WebColor) OVERRIDE; |
190 virtual bool tabsToLinks() const; | 190 virtual bool tabsToLinks() const OVERRIDE; |
191 virtual void setTabsToLinks(bool value); | 191 virtual void setTabsToLinks(bool value) OVERRIDE; |
192 virtual bool tabKeyCyclesThroughElements() const; | 192 virtual bool tabKeyCyclesThroughElements() const OVERRIDE; |
193 virtual void setTabKeyCyclesThroughElements(bool value); | 193 virtual void setTabKeyCyclesThroughElements(bool value) OVERRIDE; |
194 virtual bool isActive() const; | 194 virtual bool isActive() const OVERRIDE; |
195 virtual void setIsActive(bool value); | 195 virtual void setIsActive(bool value) OVERRIDE; |
196 virtual void setDomainRelaxationForbidden(bool, const WebString& scheme); | 196 virtual void setDomainRelaxationForbidden(bool, const WebString& scheme) OVE
RRIDE; |
197 virtual void setWindowFeatures(const WebWindowFeatures&); | 197 virtual void setWindowFeatures(const WebWindowFeatures&) OVERRIDE; |
198 virtual bool dispatchBeforeUnloadEvent(); | 198 virtual bool dispatchBeforeUnloadEvent() OVERRIDE; |
199 virtual void dispatchUnloadEvent(); | 199 virtual void dispatchUnloadEvent() OVERRIDE; |
200 virtual WebFrame* mainFrame(); | 200 virtual WebFrame* mainFrame() OVERRIDE; |
201 virtual WebFrame* findFrameByName( | 201 virtual WebFrame* findFrameByName( |
202 const WebString& name, WebFrame* relativeToFrame); | 202 const WebString& name, WebFrame* relativeToFrame) OVERRIDE; |
203 virtual WebFrame* focusedFrame(); | 203 virtual WebFrame* focusedFrame() OVERRIDE; |
204 virtual void setFocusedFrame(WebFrame* frame); | 204 virtual void setFocusedFrame(WebFrame*) OVERRIDE; |
205 virtual void setInitialFocus(bool reverse); | 205 virtual void setInitialFocus(bool reverse) OVERRIDE; |
206 virtual void clearFocusedNode(); | 206 virtual void clearFocusedNode() OVERRIDE; |
207 virtual void scrollFocusedNodeIntoView(); | 207 virtual void scrollFocusedNodeIntoView() OVERRIDE; |
208 virtual void scrollFocusedNodeIntoRect(const WebRect&); | 208 virtual void scrollFocusedNodeIntoRect(const WebRect&) OVERRIDE; |
209 virtual void zoomToFindInPageRect(const WebRect&); | 209 virtual void zoomToFindInPageRect(const WebRect&) OVERRIDE; |
210 virtual void advanceFocus(bool reverse); | 210 virtual void advanceFocus(bool reverse) OVERRIDE; |
211 virtual double zoomLevel(); | 211 virtual double zoomLevel() OVERRIDE; |
212 virtual double setZoomLevel(double); | 212 virtual double setZoomLevel(double) OVERRIDE; |
213 virtual void zoomLimitsChanged(double minimumZoomLevel, | 213 virtual void zoomLimitsChanged(double minimumZoomLevel, double maximumZoomLe
vel) OVERRIDE; |
214 double maximumZoomLevel); | 214 virtual float textZoomFactor() OVERRIDE; |
215 virtual float textZoomFactor(); | 215 virtual float setTextZoomFactor(float) OVERRIDE; |
216 virtual float setTextZoomFactor(float); | 216 virtual void setInitialPageScaleOverride(float) OVERRIDE; |
217 virtual void setInitialPageScaleOverride(float); | 217 virtual bool zoomToMultipleTargetsRect(const WebRect&) OVERRIDE; |
218 virtual bool zoomToMultipleTargetsRect(const WebRect&); | 218 virtual float pageScaleFactor() const OVERRIDE; |
219 virtual float pageScaleFactor() const; | 219 virtual void setPageScaleFactorPreservingScrollOffset(float) OVERRIDE; |
220 virtual void setPageScaleFactorPreservingScrollOffset(float); | 220 virtual void setPageScaleFactor(float scaleFactor, const WebPoint& origin) O
VERRIDE; |
221 virtual void setPageScaleFactor(float scaleFactor, const WebPoint& origin); | 221 virtual void setPageScaleFactorLimits(float minPageScale, float maxPageScale
) OVERRIDE; |
222 virtual void setPageScaleFactorLimits(float minPageScale, float maxPageScale
); | 222 virtual float minimumPageScaleFactor() const OVERRIDE; |
223 virtual float minimumPageScaleFactor() const; | 223 virtual float maximumPageScaleFactor() const OVERRIDE; |
224 virtual float maximumPageScaleFactor() const; | 224 virtual void saveScrollAndScaleState() OVERRIDE; |
225 virtual void saveScrollAndScaleState(); | 225 virtual void restoreScrollAndScaleState() OVERRIDE; |
226 virtual void restoreScrollAndScaleState(); | 226 virtual void resetScrollAndScaleState() OVERRIDE; |
227 virtual void resetScrollAndScaleState(); | 227 virtual void setIgnoreViewportTagScaleLimits(bool) OVERRIDE; |
228 virtual void setIgnoreViewportTagScaleLimits(bool); | 228 virtual WebSize contentsPreferredMinimumSize() OVERRIDE; |
229 virtual WebSize contentsPreferredMinimumSize(); | |
230 | 229 |
231 virtual float deviceScaleFactor() const; | 230 virtual float deviceScaleFactor() const OVERRIDE; |
232 virtual void setDeviceScaleFactor(float); | 231 virtual void setDeviceScaleFactor(float) OVERRIDE; |
233 | 232 |
234 virtual void setFixedLayoutSize(const WebSize&); | 233 virtual void setFixedLayoutSize(const WebSize&) OVERRIDE; |
235 | 234 |
236 virtual void enableAutoResizeMode( | 235 virtual void enableAutoResizeMode( |
237 const WebSize& minSize, | 236 const WebSize& minSize, |
238 const WebSize& maxSize); | 237 const WebSize& maxSize) OVERRIDE; |
239 virtual void disableAutoResizeMode(); | 238 virtual void disableAutoResizeMode() OVERRIDE; |
240 virtual void performMediaPlayerAction( | 239 virtual void performMediaPlayerAction( |
241 const WebMediaPlayerAction& action, | 240 const WebMediaPlayerAction& action, |
242 const WebPoint& location); | 241 const WebPoint& location) OVERRIDE; |
243 virtual void performPluginAction( | 242 virtual void performPluginAction( |
244 const WebPluginAction&, | 243 const WebPluginAction&, |
245 const WebPoint&); | 244 const WebPoint&) OVERRIDE; |
246 virtual WebHitTestResult hitTestResultAt(const WebPoint&); | 245 virtual WebHitTestResult hitTestResultAt(const WebPoint&) OVERRIDE; |
247 virtual void copyImageAt(const WebPoint& point); | 246 virtual void copyImageAt(const WebPoint&) OVERRIDE; |
248 virtual void dragSourceEndedAt( | 247 virtual void dragSourceEndedAt( |
249 const WebPoint& clientPoint, | 248 const WebPoint& clientPoint, |
250 const WebPoint& screenPoint, | 249 const WebPoint& screenPoint, |
251 WebDragOperation operation); | 250 WebDragOperation) OVERRIDE; |
252 virtual void dragSourceMovedTo( | 251 virtual void dragSourceMovedTo( |
253 const WebPoint& clientPoint, | 252 const WebPoint& clientPoint, |
254 const WebPoint& screenPoint, | 253 const WebPoint& screenPoint, |
255 WebDragOperation operation); | 254 WebDragOperation) OVERRIDE; |
256 virtual void dragSourceSystemDragEnded(); | 255 virtual void dragSourceSystemDragEnded() OVERRIDE; |
257 virtual WebDragOperation dragTargetDragEnter( | 256 virtual WebDragOperation dragTargetDragEnter( |
258 const WebDragData&, | 257 const WebDragData&, |
259 const WebPoint& clientPoint, | 258 const WebPoint& clientPoint, |
260 const WebPoint& screenPoint, | 259 const WebPoint& screenPoint, |
261 WebDragOperationsMask operationsAllowed, | 260 WebDragOperationsMask operationsAllowed, |
262 int keyModifiers); | 261 int keyModifiers) OVERRIDE; |
263 virtual WebDragOperation dragTargetDragOver( | 262 virtual WebDragOperation dragTargetDragOver( |
264 const WebPoint& clientPoint, | 263 const WebPoint& clientPoint, |
265 const WebPoint& screenPoint, | 264 const WebPoint& screenPoint, |
266 WebDragOperationsMask operationsAllowed, | 265 WebDragOperationsMask operationsAllowed, |
267 int keyModifiers); | 266 int keyModifiers) OVERRIDE; |
268 virtual void dragTargetDragLeave(); | 267 virtual void dragTargetDragLeave() OVERRIDE; |
269 virtual void dragTargetDrop( | 268 virtual void dragTargetDrop( |
270 const WebPoint& clientPoint, | 269 const WebPoint& clientPoint, |
271 const WebPoint& screenPoint, | 270 const WebPoint& screenPoint, |
272 int keyModifiers); | 271 int keyModifiers) OVERRIDE; |
273 virtual void spellingMarkers(WebVector<uint32_t>* markers); | 272 virtual void spellingMarkers(WebVector<uint32_t>* markers) OVERRIDE; |
274 virtual unsigned long createUniqueIdentifierForRequest(); | 273 virtual unsigned long createUniqueIdentifierForRequest() OVERRIDE; |
275 virtual void inspectElementAt(const WebPoint& point); | 274 virtual void inspectElementAt(const WebPoint&) OVERRIDE; |
276 virtual WebString inspectorSettings() const; | 275 virtual WebString inspectorSettings() const OVERRIDE; |
277 virtual void setInspectorSettings(const WebString& settings); | 276 virtual void setInspectorSettings(const WebString&) OVERRIDE; |
278 virtual bool inspectorSetting(const WebString& key, WebString* value) const; | 277 virtual bool inspectorSetting(const WebString& key, WebString* value) const
OVERRIDE; |
279 virtual void setInspectorSetting(const WebString& key, | 278 virtual void setInspectorSetting(const WebString& key, const WebString& valu
e) OVERRIDE; |
280 const WebString& value); | 279 virtual void setCompositorDeviceScaleFactorOverride(float) OVERRIDE; |
281 virtual void setCompositorDeviceScaleFactorOverride(float); | 280 virtual void setRootLayerTransform(const WebSize& offset, float scale) OVERR
IDE; |
282 virtual void setRootLayerTransform(const WebSize& offset, float scale); | 281 virtual WebDevToolsAgent* devToolsAgent() OVERRIDE; |
283 virtual WebDevToolsAgent* devToolsAgent(); | 282 virtual WebAXObject accessibilityObject() OVERRIDE; |
284 virtual WebAXObject accessibilityObject(); | |
285 virtual void setSelectionColors(unsigned activeBackgroundColor, | 283 virtual void setSelectionColors(unsigned activeBackgroundColor, |
286 unsigned activeForegroundColor, | 284 unsigned activeForegroundColor, |
287 unsigned inactiveBackgroundColor, | 285 unsigned inactiveBackgroundColor, |
288 unsigned inactiveForegroundColor); | 286 unsigned inactiveForegroundColor) OVERRIDE; |
289 virtual void performCustomContextMenuAction(unsigned action); | 287 virtual void performCustomContextMenuAction(unsigned action) OVERRIDE; |
290 virtual void showContextMenu(); | 288 virtual void showContextMenu() OVERRIDE; |
291 virtual WebString getSmartClipData(WebRect); | 289 virtual WebString getSmartClipData(WebRect) OVERRIDE; |
292 virtual void hidePopups(); | 290 virtual void hidePopups() OVERRIDE; |
293 virtual void addPageOverlay(WebPageOverlay*, int /* zOrder */); | 291 virtual void addPageOverlay(WebPageOverlay*, int /* zOrder */) OVERRIDE; |
294 virtual void removePageOverlay(WebPageOverlay*); | 292 virtual void removePageOverlay(WebPageOverlay*) OVERRIDE; |
295 virtual void transferActiveWheelFlingAnimation(const WebActiveWheelFlingPara
meters&); | 293 virtual void transferActiveWheelFlingAnimation(const WebActiveWheelFlingPara
meters&) OVERRIDE; |
296 virtual bool endActiveFlingAnimation(); | 294 virtual bool endActiveFlingAnimation() OVERRIDE; |
297 virtual void setShowPaintRects(bool); | 295 virtual void setShowPaintRects(bool) OVERRIDE; |
298 virtual void setShowDebugBorders(bool); | 296 void setShowDebugBorders(bool); |
299 virtual void setShowFPSCounter(bool); | 297 virtual void setShowFPSCounter(bool) OVERRIDE; |
300 virtual void setContinuousPaintingEnabled(bool); | 298 virtual void setContinuousPaintingEnabled(bool) OVERRIDE; |
301 virtual void setShowScrollBottleneckRects(bool); | 299 virtual void setShowScrollBottleneckRects(bool) OVERRIDE; |
302 | 300 |
303 // WebViewImpl | 301 // WebViewImpl |
304 | 302 |
305 void suppressInvalidations(bool enable); | 303 void suppressInvalidations(bool enable); |
306 void invalidateRect(const WebCore::IntRect&); | 304 void invalidateRect(const WebCore::IntRect&); |
307 | 305 |
308 void setIgnoreInputEvents(bool newValue); | 306 void setIgnoreInputEvents(bool newValue); |
309 void setBackgroundColorOverride(WebColor); | 307 void setBackgroundColorOverride(WebColor); |
310 void setZoomFactorOverride(float); | 308 void setZoomFactorOverride(float); |
311 WebDevToolsAgentPrivate* devToolsAgentPrivate() { return m_devToolsAgent.get
(); } | 309 WebDevToolsAgentPrivate* devToolsAgentPrivate() { return m_devToolsAgent.get
(); } |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 void mouseContextMenu(const WebMouseEvent&); | 361 void mouseContextMenu(const WebMouseEvent&); |
364 void mouseDoubleClick(const WebMouseEvent&); | 362 void mouseDoubleClick(const WebMouseEvent&); |
365 | 363 |
366 bool detectContentOnTouch(const WebPoint&); | 364 bool detectContentOnTouch(const WebPoint&); |
367 bool startPageScaleAnimation(const WebCore::IntPoint& targetPosition, bool u
seAnchor, float newScale, double durationInSeconds); | 365 bool startPageScaleAnimation(const WebCore::IntPoint& targetPosition, bool u
seAnchor, float newScale, double durationInSeconds); |
368 | 366 |
369 void numberOfWheelEventHandlersChanged(unsigned); | 367 void numberOfWheelEventHandlersChanged(unsigned); |
370 void hasTouchEventHandlers(bool); | 368 void hasTouchEventHandlers(bool); |
371 | 369 |
372 // WebGestureCurveTarget implementation for fling. | 370 // WebGestureCurveTarget implementation for fling. |
373 virtual void scrollBy(const WebFloatSize&); | 371 virtual void scrollBy(const WebFloatSize&) OVERRIDE; |
374 | 372 |
375 // Handles context menu events orignated via the the keyboard. These | 373 // Handles context menu events orignated via the the keyboard. These |
376 // include the VK_APPS virtual key and the Shift+F10 combine. Code is | 374 // include the VK_APPS virtual key and the Shift+F10 combine. Code is |
377 // based on the Webkit function bool WebView::handleContextMenuEvent(WPARAM | 375 // based on the Webkit function bool WebView::handleContextMenuEvent(WPARAM |
378 // wParam, LPARAM lParam) in webkit\webkit\win\WebView.cpp. The only | 376 // wParam, LPARAM lParam) in webkit\webkit\win\WebView.cpp. The only |
379 // significant change in this function is the code to convert from a | 377 // significant change in this function is the code to convert from a |
380 // Keyboard event to the Right Mouse button down event. | 378 // Keyboard event to the Right Mouse button down event. |
381 bool sendContextMenuEvent(const WebKeyboardEvent&); | 379 bool sendContextMenuEvent(const WebKeyboardEvent&); |
382 | 380 |
383 // Notifies the WebView that a load has been committed. isNewNavigation | 381 // Notifies the WebView that a load has been committed. isNewNavigation |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
459 WebCore::GraphicsLayer* rootGraphicsLayer(); | 457 WebCore::GraphicsLayer* rootGraphicsLayer(); |
460 bool allowsAcceleratedCompositing(); | 458 bool allowsAcceleratedCompositing(); |
461 void setRootGraphicsLayer(WebCore::GraphicsLayer*); | 459 void setRootGraphicsLayer(WebCore::GraphicsLayer*); |
462 void scheduleCompositingLayerSync(); | 460 void scheduleCompositingLayerSync(); |
463 void scrollRootLayerRect(const WebCore::IntSize& scrollDelta, const WebCore:
:IntRect& clipRect); | 461 void scrollRootLayerRect(const WebCore::IntSize& scrollDelta, const WebCore:
:IntRect& clipRect); |
464 WebCore::GraphicsLayerFactory* graphicsLayerFactory() const; | 462 WebCore::GraphicsLayerFactory* graphicsLayerFactory() const; |
465 WebCore::RenderLayerCompositor* compositor() const; | 463 WebCore::RenderLayerCompositor* compositor() const; |
466 void registerForAnimations(WebLayer*); | 464 void registerForAnimations(WebLayer*); |
467 void scheduleAnimation(); | 465 void scheduleAnimation(); |
468 | 466 |
469 virtual void setVisibilityState(WebPageVisibilityState, bool); | 467 virtual void setVisibilityState(WebPageVisibilityState, bool) OVERRIDE; |
470 | 468 |
471 WebCore::PopupContainer* selectPopup() const { return m_selectPopup.get(); } | 469 WebCore::PopupContainer* selectPopup() const { return m_selectPopup.get(); } |
472 bool hasOpenedPopup() const { return m_selectPopup || m_pagePopup; } | 470 bool hasOpenedPopup() const { return m_selectPopup || m_pagePopup; } |
473 | 471 |
474 // Returns true if the event leads to scrolling. | 472 // Returns true if the event leads to scrolling. |
475 static bool mapKeyCodeForScroll(int keyCode, | 473 static bool mapKeyCodeForScroll(int keyCode, |
476 WebCore::ScrollDirection* scrollDirection, | 474 WebCore::ScrollDirection* scrollDirection, |
477 WebCore::ScrollGranularity* scrollGranularity
); | 475 WebCore::ScrollGranularity* scrollGranularity
); |
478 | 476 |
479 // Called by a full frame plugin inside this view to inform it that its | 477 // Called by a full frame plugin inside this view to inform it that its |
(...skipping 21 matching lines...) Expand all Loading... |
501 | 499 |
502 // Exposed for the purpose of overriding device metrics. | 500 // Exposed for the purpose of overriding device metrics. |
503 void sendResizeEventAndRepaint(); | 501 void sendResizeEventAndRepaint(); |
504 | 502 |
505 // Exposed for testing purposes. | 503 // Exposed for testing purposes. |
506 bool hasHorizontalScrollbar(); | 504 bool hasHorizontalScrollbar(); |
507 bool hasVerticalScrollbar(); | 505 bool hasVerticalScrollbar(); |
508 | 506 |
509 // Pointer Lock calls allow a page to capture all mouse events and | 507 // Pointer Lock calls allow a page to capture all mouse events and |
510 // disable the system cursor. | 508 // disable the system cursor. |
511 virtual bool requestPointerLock(); | 509 bool requestPointerLock(); |
512 virtual void requestPointerUnlock(); | 510 void requestPointerUnlock(); |
513 virtual bool isPointerLocked(); | 511 bool isPointerLocked(); |
514 | 512 |
515 // Heuristic-based function for determining if we should disable workarounds | 513 // Heuristic-based function for determining if we should disable workarounds |
516 // for viewing websites that are not optimized for mobile devices. | 514 // for viewing websites that are not optimized for mobile devices. |
517 bool shouldDisableDesktopWorkarounds(); | 515 bool shouldDisableDesktopWorkarounds(); |
518 | 516 |
519 // Exposed for tests. | 517 // Exposed for tests. |
520 unsigned numLinkHighlights() { return m_linkHighlights.size(); } | 518 unsigned numLinkHighlights() { return m_linkHighlights.size(); } |
521 LinkHighlight* linkHighlight(int i) { return m_linkHighlights[i].get(); } | 519 LinkHighlight* linkHighlight(int i) { return m_linkHighlights[i].get(); } |
522 | 520 |
523 WebSettingsImpl* settingsImpl(); | 521 WebSettingsImpl* settingsImpl(); |
524 | 522 |
525 // Returns the bounding box of the block type node touched by the WebRect. | 523 // Returns the bounding box of the block type node touched by the WebRect. |
526 WebRect computeBlockBounds(const WebRect&, bool ignoreClipping); | 524 WebRect computeBlockBounds(const WebRect&, bool ignoreClipping); |
527 | 525 |
528 WebCore::IntPoint clampOffsetAtScale(const WebCore::IntPoint& offset, float
scale); | 526 WebCore::IntPoint clampOffsetAtScale(const WebCore::IntPoint& offset, float
scale); |
529 | 527 |
530 // Exposed for tests. | 528 // Exposed for tests. |
531 WebVector<WebCompositionUnderline> compositionUnderlines() const; | 529 WebVector<WebCompositionUnderline> compositionUnderlines() const; |
532 | 530 |
533 WebLayerTreeView* layerTreeView() const { return m_layerTreeView; }; | 531 WebLayerTreeView* layerTreeView() const { return m_layerTreeView; } |
534 | 532 |
535 private: | 533 private: |
536 float legibleScale() const; | 534 float legibleScale() const; |
537 void refreshPageScaleFactorAfterLayout(); | 535 void refreshPageScaleFactorAfterLayout(); |
538 void setUserAgentPageScaleConstraints(WebCore::PageScaleConstraints newConst
raints); | 536 void setUserAgentPageScaleConstraints(WebCore::PageScaleConstraints newConst
raints); |
539 float clampPageScaleFactorToLimits(float) const; | 537 float clampPageScaleFactorToLimits(float) const; |
540 WebCore::IntSize contentsSize() const; | 538 WebCore::IntSize contentsSize() const; |
541 | 539 |
542 void resetSavedScrollAndScaleState(); | 540 void resetSavedScrollAndScaleState(); |
543 | 541 |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
780 Vector<RefPtr<WebHelperPluginImpl> > m_helperPluginsPendingClose; | 778 Vector<RefPtr<WebHelperPluginImpl> > m_helperPluginsPendingClose; |
781 }; | 779 }; |
782 | 780 |
783 // We have no ways to check if the specified WebView is an instance of | 781 // We have no ways to check if the specified WebView is an instance of |
784 // WebViewImpl because WebViewImpl is the only implementation of WebView. | 782 // WebViewImpl because WebViewImpl is the only implementation of WebView. |
785 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true); | 783 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true); |
786 | 784 |
787 } // namespace blink | 785 } // namespace blink |
788 | 786 |
789 #endif | 787 #endif |
OLD | NEW |