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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 #include "web/StorageClientImpl.h" | 62 #include "web/StorageClientImpl.h" |
63 #include "web/WebExport.h" | 63 #include "web/WebExport.h" |
64 #include "wtf/Compiler.h" | 64 #include "wtf/Compiler.h" |
65 #include "wtf/HashSet.h" | 65 #include "wtf/HashSet.h" |
66 #include "wtf/RefCounted.h" | 66 #include "wtf/RefCounted.h" |
67 #include "wtf/Vector.h" | 67 #include "wtf/Vector.h" |
68 #include <memory> | 68 #include <memory> |
69 | 69 |
70 namespace blink { | 70 namespace blink { |
71 | 71 |
| 72 class CompositorMutatorImpl; |
72 class DataObject; | 73 class DataObject; |
73 class DevToolsEmulator; | 74 class DevToolsEmulator; |
74 class Frame; | 75 class Frame; |
75 class FullscreenController; | 76 class FullscreenController; |
76 class InspectorOverlay; | 77 class InspectorOverlay; |
77 class LinkHighlightImpl; | 78 class LinkHighlightImpl; |
78 class PageOverlay; | 79 class PageOverlay; |
79 class PageScaleConstraintsSet; | 80 class PageScaleConstraintsSet; |
80 class PaintLayerCompositor; | 81 class PaintLayerCompositor; |
| 82 class ScrollAndScaleEmulator; |
81 class TopControls; | 83 class TopControls; |
82 class UserGestureToken; | 84 class UserGestureToken; |
83 class WebActiveGestureAnimation; | 85 class WebActiveGestureAnimation; |
84 class WebDevToolsAgentImpl; | 86 class WebDevToolsAgentImpl; |
85 class WebElement; | 87 class WebElement; |
86 class WebLayerTreeView; | 88 class WebLayerTreeView; |
87 class WebLocalFrame; | 89 class WebLocalFrame; |
88 class WebLocalFrameImpl; | 90 class WebLocalFrameImpl; |
89 class WebImage; | 91 class WebImage; |
90 class CompositorMutatorImpl; | |
91 class WebPagePopupImpl; | 92 class WebPagePopupImpl; |
92 class WebPlugin; | 93 class WebPlugin; |
93 class WebRemoteFrame; | 94 class WebRemoteFrame; |
94 class WebSelection; | 95 class WebSelection; |
95 class WebSettingsImpl; | 96 class WebSettingsImpl; |
96 class WebViewScheduler; | 97 class WebViewScheduler; |
97 | 98 |
98 class WEB_EXPORT WebViewImpl final : WTF_NON_EXPORTED_BASE(public WebView) | 99 class WEB_EXPORT WebViewImpl final : WTF_NON_EXPORTED_BASE(public WebView) |
99 , public RefCounted<WebViewImpl> | 100 , public RefCounted<WebViewImpl> |
100 , WTF_NON_EXPORTED_BASE(public WebGestureCurveTarget) | 101 , WTF_NON_EXPORTED_BASE(public WebGestureCurveTarget) |
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
523 double lastFrameTimeMonotonic() const { return m_lastFrameTimeMonotonic; } | 524 double lastFrameTimeMonotonic() const { return m_lastFrameTimeMonotonic; } |
524 | 525 |
525 ChromeClientImpl& chromeClient() const { return *m_chromeClientImpl.get(); } | 526 ChromeClientImpl& chromeClient() const { return *m_chromeClientImpl.get(); } |
526 | 527 |
527 private: | 528 private: |
528 InspectorOverlay* inspectorOverlay(); | 529 InspectorOverlay* inspectorOverlay(); |
529 | 530 |
530 void setPageScaleFactorAndLocation(float, const FloatPoint&); | 531 void setPageScaleFactorAndLocation(float, const FloatPoint&); |
531 void propagateZoomFactorToLocalFrameRoots(Frame*, float); | 532 void propagateZoomFactorToLocalFrameRoots(Frame*, float); |
532 | 533 |
| 534 // Override the page scale and scroll positions of main frame and visual vie
wport. |
| 535 void setScrollAndScaleOverride(const WebDeviceEmulationParams&); |
| 536 |
| 537 // Clear the page scale and scroll position overrides. |
| 538 void clearScrollAndScaleOverride(); |
| 539 |
533 void scrollAndRescaleViewports(float scaleFactor, const IntPoint& mainFrameO
rigin, const FloatPoint& visualViewportOrigin); | 540 void scrollAndRescaleViewports(float scaleFactor, const IntPoint& mainFrameO
rigin, const FloatPoint& visualViewportOrigin); |
534 | 541 |
535 float maximumLegiblePageScale() const; | 542 float maximumLegiblePageScale() const; |
536 void refreshPageScaleFactorAfterLayout(); | 543 void refreshPageScaleFactorAfterLayout(); |
537 IntSize contentsSize() const; | 544 IntSize contentsSize() const; |
538 | 545 |
539 void performResize(); | 546 void performResize(); |
540 void resizeViewWhileAnchored(FrameView*, float topControlsHeight, bool topCo
ntrolsShrinkLayout); | 547 void resizeViewWhileAnchored(FrameView*, float topControlsHeight, bool topCo
ntrolsShrinkLayout); |
541 | 548 |
542 friend class WebView; // So WebView::Create can call our constructor | 549 friend class WebView; // So WebView::Create can call our constructor |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
663 float m_doubleTapZoomPageScaleFactor; | 670 float m_doubleTapZoomPageScaleFactor; |
664 // Have we sent a double-tap zoom and not yet heard back the scale? | 671 // Have we sent a double-tap zoom and not yet heard back the scale? |
665 bool m_doubleTapZoomPending; | 672 bool m_doubleTapZoomPending; |
666 | 673 |
667 // Used for testing purposes. | 674 // Used for testing purposes. |
668 bool m_enableFakePageScaleAnimationForTesting; | 675 bool m_enableFakePageScaleAnimationForTesting; |
669 IntPoint m_fakePageScaleAnimationTargetPosition; | 676 IntPoint m_fakePageScaleAnimationTargetPosition; |
670 float m_fakePageScaleAnimationPageScaleFactor; | 677 float m_fakePageScaleAnimationPageScaleFactor; |
671 bool m_fakePageScaleAnimationUseAnchor; | 678 bool m_fakePageScaleAnimationUseAnchor; |
672 | 679 |
| 680 RefPtr<ScrollAndScaleEmulator> m_scrollAndScaleEmulator; |
| 681 |
673 bool m_doingDragAndDrop; | 682 bool m_doingDragAndDrop; |
674 | 683 |
675 bool m_ignoreInputEvents; | 684 bool m_ignoreInputEvents; |
676 | 685 |
677 float m_compositorDeviceScaleFactorOverride; | 686 float m_compositorDeviceScaleFactorOverride; |
678 WebSize m_rootLayerOffset; | 687 WebSize m_rootLayerOffset; |
679 float m_rootLayerScale; | 688 float m_rootLayerScale; |
680 | 689 |
681 // Webkit expects keyPress events to be suppressed if the associated keyDown | 690 // Webkit expects keyPress events to be suppressed if the associated keyDown |
682 // event was handled. Safari implements this behavior by peeking out the | 691 // event was handled. Safari implements this behavior by peeking out the |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
759 double m_lastFrameTimeMonotonic; | 768 double m_lastFrameTimeMonotonic; |
760 }; | 769 }; |
761 | 770 |
762 // We have no ways to check if the specified WebView is an instance of | 771 // We have no ways to check if the specified WebView is an instance of |
763 // WebViewImpl because WebViewImpl is the only implementation of WebView. | 772 // WebViewImpl because WebViewImpl is the only implementation of WebView. |
764 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true); | 773 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true); |
765 | 774 |
766 } // namespace blink | 775 } // namespace blink |
767 | 776 |
768 #endif | 777 #endif |
OLD | NEW |