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 19 matching lines...) Expand all Loading... |
30 | 30 |
31 #ifndef WebViewImpl_h | 31 #ifndef WebViewImpl_h |
32 #define WebViewImpl_h | 32 #define WebViewImpl_h |
33 | 33 |
34 #include "core/page/ContextMenuProvider.h" | 34 #include "core/page/ContextMenuProvider.h" |
35 #include "core/page/EventWithHitTestResults.h" | 35 #include "core/page/EventWithHitTestResults.h" |
36 #include "platform/animation/CompositorAnimationTimeline.h" | 36 #include "platform/animation/CompositorAnimationTimeline.h" |
37 #include "platform/geometry/IntPoint.h" | 37 #include "platform/geometry/IntPoint.h" |
38 #include "platform/geometry/IntRect.h" | 38 #include "platform/geometry/IntRect.h" |
39 #include "platform/graphics/GraphicsLayer.h" | 39 #include "platform/graphics/GraphicsLayer.h" |
40 #include "platform/graphics/compositing/PaintArtifactCompositor.h" | |
41 #include "platform/heap/Handle.h" | 40 #include "platform/heap/Handle.h" |
42 #include "public/platform/WebDisplayMode.h" | 41 #include "public/platform/WebDisplayMode.h" |
43 #include "public/platform/WebFloatSize.h" | 42 #include "public/platform/WebFloatSize.h" |
44 #include "public/platform/WebGestureCurveTarget.h" | 43 #include "public/platform/WebGestureCurveTarget.h" |
45 #include "public/platform/WebInputEventResult.h" | 44 #include "public/platform/WebInputEventResult.h" |
46 #include "public/platform/WebLayer.h" | 45 #include "public/platform/WebLayer.h" |
47 #include "public/platform/WebPoint.h" | 46 #include "public/platform/WebPoint.h" |
48 #include "public/platform/WebRect.h" | 47 #include "public/platform/WebRect.h" |
49 #include "public/platform/WebScheduler.h" | 48 #include "public/platform/WebScheduler.h" |
50 #include "public/platform/WebSize.h" | 49 #include "public/platform/WebSize.h" |
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
493 void forceNextDrawingBufferCreationToFail() override; | 492 void forceNextDrawingBufferCreationToFail() override; |
494 | 493 |
495 CompositorProxyClient* createCompositorProxyClient(); | 494 CompositorProxyClient* createCompositorProxyClient(); |
496 IntSize mainFrameSize(); | 495 IntSize mainFrameSize(); |
497 WebDisplayMode displayMode() const { return m_displayMode; } | 496 WebDisplayMode displayMode() const { return m_displayMode; } |
498 | 497 |
499 PageScaleConstraintsSet& pageScaleConstraintsSet() const; | 498 PageScaleConstraintsSet& pageScaleConstraintsSet() const; |
500 | 499 |
501 FloatSize elasticOverscroll() const { return m_elasticOverscroll; } | 500 FloatSize elasticOverscroll() const { return m_elasticOverscroll; } |
502 | 501 |
503 // Attaches the PaintArtifactCompositor's tree to this WebView's layer tree | |
504 // view. | |
505 void attachPaintArtifactCompositor(); | |
506 | |
507 // Detaches the PaintArtifactCompositor and clears the layer tree view's | |
508 // root layer. | |
509 void detachPaintArtifactCompositor(); | |
510 | |
511 // Use in Slimming Paint v2 to update the layer tree for the content. | |
512 PaintArtifactCompositor& getPaintArtifactCompositor() { return m_paintArtifa
ctCompositor; } | |
513 | |
514 bool isTransparent() const; | 502 bool isTransparent() const; |
515 void setIsTransparent(bool value); | 503 void setIsTransparent(bool value); |
516 | 504 |
517 double lastFrameTimeMonotonic() const { return m_lastFrameTimeMonotonic; } | 505 double lastFrameTimeMonotonic() const { return m_lastFrameTimeMonotonic; } |
518 | 506 |
519 ChromeClientImpl& chromeClient() const { return *m_chromeClientImpl.get(); } | 507 ChromeClientImpl& chromeClient() const { return *m_chromeClientImpl.get(); } |
520 | 508 |
521 private: | 509 private: |
522 InspectorOverlay* inspectorOverlay(); | 510 InspectorOverlay* inspectorOverlay(); |
523 | 511 |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
613 | 601 |
614 void enablePopupMouseWheelEventListener(); | 602 void enablePopupMouseWheelEventListener(); |
615 void disablePopupMouseWheelEventListener(); | 603 void disablePopupMouseWheelEventListener(); |
616 | 604 |
617 void cancelPagePopup(); | 605 void cancelPagePopup(); |
618 void updatePageOverlays(); | 606 void updatePageOverlays(); |
619 | 607 |
620 float deviceScaleFactor() const; | 608 float deviceScaleFactor() const; |
621 | 609 |
622 void setRootGraphicsLayer(GraphicsLayer*); | 610 void setRootGraphicsLayer(GraphicsLayer*); |
| 611 void setRootLayer(WebLayer*); |
623 void attachCompositorAnimationTimeline(CompositorAnimationTimeline*); | 612 void attachCompositorAnimationTimeline(CompositorAnimationTimeline*); |
624 void detachCompositorAnimationTimeline(CompositorAnimationTimeline*); | 613 void detachCompositorAnimationTimeline(CompositorAnimationTimeline*); |
625 | 614 |
626 LocalFrame* focusedLocalFrameInWidget() const; | 615 LocalFrame* focusedLocalFrameInWidget() const; |
627 LocalFrame* focusedLocalFrameAvailableForIme() const; | 616 LocalFrame* focusedLocalFrameAvailableForIme() const; |
628 | 617 |
629 WebViewClient* m_client; // Can be 0 (e.g. unittests, shared workers, etc.) | 618 WebViewClient* m_client; // Can be 0 (e.g. unittests, shared workers, etc.) |
630 WebSpellCheckClient* m_spellCheckClient; | 619 WebSpellCheckClient* m_spellCheckClient; |
631 | 620 |
632 Persistent<ChromeClientImpl> m_chromeClientImpl; | 621 Persistent<ChromeClientImpl> m_chromeClientImpl; |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
755 // compositor thread. The LayerTreeHostImpl is indirectly owned by this | 744 // compositor thread. The LayerTreeHostImpl is indirectly owned by this |
756 // class so this pointer should be valid until this class is destructed. | 745 // class so this pointer should be valid until this class is destructed. |
757 CrossThreadPersistent<CompositorMutatorImpl> m_mutator; | 746 CrossThreadPersistent<CompositorMutatorImpl> m_mutator; |
758 | 747 |
759 Persistent<EventListener> m_popupMouseWheelEventListener; | 748 Persistent<EventListener> m_popupMouseWheelEventListener; |
760 | 749 |
761 WebPageImportanceSignals m_pageImportanceSignals; | 750 WebPageImportanceSignals m_pageImportanceSignals; |
762 | 751 |
763 const std::unique_ptr<WebViewScheduler> m_scheduler; | 752 const std::unique_ptr<WebViewScheduler> m_scheduler; |
764 | 753 |
765 // Manages the layer tree created for this page in Slimming Paint v2. | |
766 PaintArtifactCompositor m_paintArtifactCompositor; | |
767 | |
768 double m_lastFrameTimeMonotonic; | 754 double m_lastFrameTimeMonotonic; |
769 | 755 |
770 // TODO(lfg): This is used in order to disable compositor visibility while | 756 // TODO(lfg): This is used in order to disable compositor visibility while |
771 // the page is still visible. This is needed until the WebView and WebWidget | 757 // the page is still visible. This is needed until the WebView and WebWidget |
772 // split is complete, since in out-of-process iframes the page can be | 758 // split is complete, since in out-of-process iframes the page can be |
773 // visible, but the WebView should not be used as a widget. | 759 // visible, but the WebView should not be used as a widget. |
774 bool m_overrideCompositorVisibility; | 760 bool m_overrideCompositorVisibility; |
775 | 761 |
776 Persistent<ResizeViewportAnchor> m_resizeViewportAnchor; | 762 Persistent<ResizeViewportAnchor> m_resizeViewportAnchor; |
777 }; | 763 }; |
778 | 764 |
779 // We have no ways to check if the specified WebView is an instance of | 765 // We have no ways to check if the specified WebView is an instance of |
780 // WebViewImpl because WebViewImpl is the only implementation of WebView. | 766 // WebViewImpl because WebViewImpl is the only implementation of WebView. |
781 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true); | 767 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true); |
782 | 768 |
783 } // namespace blink | 769 } // namespace blink |
784 | 770 |
785 #endif | 771 #endif |
OLD | NEW |