| 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 #include "web/StorageClientImpl.h" | 63 #include "web/StorageClientImpl.h" |
| 64 #include "web/WebExport.h" | 64 #include "web/WebExport.h" |
| 65 #include "wtf/Compiler.h" | 65 #include "wtf/Compiler.h" |
| 66 #include "wtf/HashSet.h" | 66 #include "wtf/HashSet.h" |
| 67 #include "wtf/RefCounted.h" | 67 #include "wtf/RefCounted.h" |
| 68 #include "wtf/Vector.h" | 68 #include "wtf/Vector.h" |
| 69 #include <memory> | 69 #include <memory> |
| 70 | 70 |
| 71 namespace blink { | 71 namespace blink { |
| 72 | 72 |
| 73 class BrowserControls; |
| 73 class DataObject; | 74 class DataObject; |
| 74 class DevToolsEmulator; | 75 class DevToolsEmulator; |
| 75 class Frame; | 76 class Frame; |
| 76 class FullscreenController; | 77 class FullscreenController; |
| 77 class InspectorOverlay; | 78 class InspectorOverlay; |
| 78 class LinkHighlightImpl; | 79 class LinkHighlightImpl; |
| 79 class PageOverlay; | 80 class PageOverlay; |
| 80 class PageScaleConstraintsSet; | 81 class PageScaleConstraintsSet; |
| 81 class PaintLayerCompositor; | 82 class PaintLayerCompositor; |
| 82 class TopControls; | |
| 83 class UserGestureToken; | 83 class UserGestureToken; |
| 84 class WebActiveGestureAnimation; | 84 class WebActiveGestureAnimation; |
| 85 class WebDevToolsAgentImpl; | 85 class WebDevToolsAgentImpl; |
| 86 class WebElement; | 86 class WebElement; |
| 87 class WebLayerTreeView; | 87 class WebLayerTreeView; |
| 88 class WebLocalFrame; | 88 class WebLocalFrame; |
| 89 class WebLocalFrameImpl; | 89 class WebLocalFrameImpl; |
| 90 class WebImage; | 90 class WebImage; |
| 91 class CompositorMutatorImpl; | 91 class CompositorMutatorImpl; |
| 92 class WebPagePopupImpl; | 92 class WebPagePopupImpl; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 WebCompositeAndReadbackAsyncCallback*) override; | 126 WebCompositeAndReadbackAsyncCallback*) override; |
| 127 void themeChanged() override; | 127 void themeChanged() override; |
| 128 WebInputEventResult handleInputEvent(const WebInputEvent&) override; | 128 WebInputEventResult handleInputEvent(const WebInputEvent&) override; |
| 129 void setCursorVisibilityState(bool isVisible) override; | 129 void setCursorVisibilityState(bool isVisible) override; |
| 130 bool hasTouchEventHandlersAt(const WebPoint&) override; | 130 bool hasTouchEventHandlersAt(const WebPoint&) override; |
| 131 | 131 |
| 132 void applyViewportDeltas(const WebFloatSize& visualViewportDelta, | 132 void applyViewportDeltas(const WebFloatSize& visualViewportDelta, |
| 133 const WebFloatSize& layoutViewportDelta, | 133 const WebFloatSize& layoutViewportDelta, |
| 134 const WebFloatSize& elasticOverscrollDelta, | 134 const WebFloatSize& elasticOverscrollDelta, |
| 135 float pageScaleDelta, | 135 float pageScaleDelta, |
| 136 float topControlsShownRatioDelta) override; | 136 float browserControlsShownRatioDelta) override; |
| 137 void mouseCaptureLost() override; | 137 void mouseCaptureLost() override; |
| 138 void setFocus(bool enable) override; | 138 void setFocus(bool enable) override; |
| 139 bool setComposition(const WebString& text, | 139 bool setComposition(const WebString& text, |
| 140 const WebVector<WebCompositionUnderline>& underlines, | 140 const WebVector<WebCompositionUnderline>& underlines, |
| 141 int selectionStart, | 141 int selectionStart, |
| 142 int selectionEnd) override; | 142 int selectionEnd) override; |
| 143 bool commitText(const WebString& text, int relativeCaretPosition) override; | 143 bool commitText(const WebString& text, int relativeCaretPosition) override; |
| 144 bool finishComposingText( | 144 bool finishComposingText( |
| 145 ConfirmCompositionBehavior selectionBehavior) override; | 145 ConfirmCompositionBehavior selectionBehavior) override; |
| 146 WebRange compositionRange() override; | 146 WebRange compositionRange() override; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 170 WebString pageEncoding() const override; | 170 WebString pageEncoding() const override; |
| 171 bool tabsToLinks() const override; | 171 bool tabsToLinks() const override; |
| 172 void setTabsToLinks(bool value) override; | 172 void setTabsToLinks(bool value) override; |
| 173 bool tabKeyCyclesThroughElements() const override; | 173 bool tabKeyCyclesThroughElements() const override; |
| 174 void setTabKeyCyclesThroughElements(bool value) override; | 174 void setTabKeyCyclesThroughElements(bool value) override; |
| 175 bool isActive() const override; | 175 bool isActive() const override; |
| 176 void setIsActive(bool value) override; | 176 void setIsActive(bool value) override; |
| 177 void setDomainRelaxationForbidden(bool, const WebString& scheme) override; | 177 void setDomainRelaxationForbidden(bool, const WebString& scheme) override; |
| 178 void setWindowFeatures(const WebWindowFeatures&) override; | 178 void setWindowFeatures(const WebWindowFeatures&) override; |
| 179 void setOpenedByDOM() override; | 179 void setOpenedByDOM() override; |
| 180 void resizeWithTopControls(const WebSize&, | 180 void resizeWithBrowserControls(const WebSize&, |
| 181 float topControlsHeight, | 181 float browserControlsHeight, |
| 182 bool topControlsShrinkLayout) override; | 182 bool browserControlsShrinkLayout) override; |
| 183 WebFrame* mainFrame() override; | 183 WebFrame* mainFrame() override; |
| 184 WebFrame* findFrameByName(const WebString& name, | 184 WebFrame* findFrameByName(const WebString& name, |
| 185 WebFrame* relativeToFrame) override; | 185 WebFrame* relativeToFrame) override; |
| 186 WebLocalFrame* focusedFrame() override; | 186 WebLocalFrame* focusedFrame() override; |
| 187 void setFocusedFrame(WebFrame*) override; | 187 void setFocusedFrame(WebFrame*) override; |
| 188 void focusDocumentView(WebFrame*) override; | 188 void focusDocumentView(WebFrame*) override; |
| 189 void unfocusDocumentView() override; | 189 void unfocusDocumentView() override; |
| 190 void setInitialFocus(bool reverse) override; | 190 void setInitialFocus(bool reverse) override; |
| 191 void clearFocusedElement() override; | 191 void clearFocusedElement() override; |
| 192 bool scrollFocusedEditableElementIntoRect(const WebRect&) override; | 192 bool scrollFocusedEditableElementIntoRect(const WebRect&) override; |
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 482 | 482 |
| 483 // Returns the bounding box of the block type node touched by the WebPoint. | 483 // Returns the bounding box of the block type node touched by the WebPoint. |
| 484 WebRect computeBlockBound(const WebPoint&, bool ignoreClipping); | 484 WebRect computeBlockBound(const WebPoint&, bool ignoreClipping); |
| 485 | 485 |
| 486 WebLayerTreeView* layerTreeView() const { return m_layerTreeView; } | 486 WebLayerTreeView* layerTreeView() const { return m_layerTreeView; } |
| 487 | 487 |
| 488 bool matchesHeuristicsForGpuRasterizationForTesting() const { | 488 bool matchesHeuristicsForGpuRasterizationForTesting() const { |
| 489 return m_matchesHeuristicsForGpuRasterization; | 489 return m_matchesHeuristicsForGpuRasterization; |
| 490 } | 490 } |
| 491 | 491 |
| 492 void updateTopControlsState(WebTopControlsState constraint, | 492 void updateBrowserControlsState(WebBrowserControlsState constraint, |
| 493 WebTopControlsState current, | 493 WebBrowserControlsState current, |
| 494 bool animate) override; | 494 bool animate) override; |
| 495 | 495 |
| 496 TopControls& topControls(); | 496 BrowserControls& browserControls(); |
| 497 // Called anytime top controls layout height or content offset have changed. | 497 // Called anytime browser controls layout height or content offset have |
| 498 void didUpdateTopControls(); | 498 // changed. |
| 499 void didUpdateBrowserControls(); |
| 499 | 500 |
| 500 void forceNextWebGLContextCreationToFail() override; | 501 void forceNextWebGLContextCreationToFail() override; |
| 501 void forceNextDrawingBufferCreationToFail() override; | 502 void forceNextDrawingBufferCreationToFail() override; |
| 502 | 503 |
| 503 CompositorProxyClient* createCompositorProxyClient(); | 504 CompositorProxyClient* createCompositorProxyClient(); |
| 504 IntSize mainFrameSize(); | 505 IntSize mainFrameSize(); |
| 505 WebDisplayMode displayMode() const { return m_displayMode; } | 506 WebDisplayMode displayMode() const { return m_displayMode; } |
| 506 | 507 |
| 507 PageScaleConstraintsSet& pageScaleConstraintsSet() const; | 508 PageScaleConstraintsSet& pageScaleConstraintsSet() const; |
| 508 | 509 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 524 void scrollAndRescaleViewports(float scaleFactor, | 525 void scrollAndRescaleViewports(float scaleFactor, |
| 525 const IntPoint& mainFrameOrigin, | 526 const IntPoint& mainFrameOrigin, |
| 526 const FloatPoint& visualViewportOrigin); | 527 const FloatPoint& visualViewportOrigin); |
| 527 | 528 |
| 528 float maximumLegiblePageScale() const; | 529 float maximumLegiblePageScale() const; |
| 529 void refreshPageScaleFactorAfterLayout(); | 530 void refreshPageScaleFactorAfterLayout(); |
| 530 IntSize contentsSize() const; | 531 IntSize contentsSize() const; |
| 531 | 532 |
| 532 void performResize(); | 533 void performResize(); |
| 533 void resizeViewWhileAnchored(FrameView*, | 534 void resizeViewWhileAnchored(FrameView*, |
| 534 float topControlsHeight, | 535 float browserControlsHeight, |
| 535 bool topControlsShrinkLayout); | 536 bool browserControlsShrinkLayout); |
| 536 | 537 |
| 537 // Overrides the compositor visibility. See the description of | 538 // Overrides the compositor visibility. See the description of |
| 538 // m_overrideCompositorVisibility for more details. | 539 // m_overrideCompositorVisibility for more details. |
| 539 void setCompositorVisibility(bool); | 540 void setCompositorVisibility(bool); |
| 540 | 541 |
| 541 // TODO(lfg): Remove once WebViewFrameWidget is deleted. | 542 // TODO(lfg): Remove once WebViewFrameWidget is deleted. |
| 542 void scheduleAnimationForWidget(); | 543 void scheduleAnimationForWidget(); |
| 543 bool getCompositionCharacterBounds(WebVector<WebRect>&) override; | 544 bool getCompositionCharacterBounds(WebVector<WebRect>&) override; |
| 544 void applyReplacementRange(const WebRange&) override; | 545 void applyReplacementRange(const WebRange&) override; |
| 545 | 546 |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 772 Persistent<ResizeViewportAnchor> m_resizeViewportAnchor; | 773 Persistent<ResizeViewportAnchor> m_resizeViewportAnchor; |
| 773 }; | 774 }; |
| 774 | 775 |
| 775 // We have no ways to check if the specified WebView is an instance of | 776 // We have no ways to check if the specified WebView is an instance of |
| 776 // WebViewImpl because WebViewImpl is the only implementation of WebView. | 777 // WebViewImpl because WebViewImpl is the only implementation of WebView. |
| 777 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true); | 778 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true); |
| 778 | 779 |
| 779 } // namespace blink | 780 } // namespace blink |
| 780 | 781 |
| 781 #endif | 782 #endif |
| OLD | NEW |