Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(355)

Unified Diff: public/platform/WebLayerTreeView.h

Issue 1287403005: Make all methods on WebLayerTreeView optional. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« Source/web/tests/WebFrameTest.cpp ('K') | « Source/web/tests/WebFrameTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/platform/WebLayerTreeView.h
diff --git a/public/platform/WebLayerTreeView.h b/public/platform/WebLayerTreeView.h
index 441f4686442f4caa91fd0648d5a14d3b7f98dbec..67a11e23a4c616277f53bd5869a5f127bdabf88c 100644
--- a/public/platform/WebLayerTreeView.h
+++ b/public/platform/WebLayerTreeView.h
@@ -54,38 +54,38 @@ public:
// Initialization and lifecycle --------------------------------------
// Sets the root of the tree. The root is set by way of the constructor.
- virtual void setRootLayer(const WebLayer&) = 0;
- virtual void clearRootLayer() = 0;
+ virtual void setRootLayer(const WebLayer&) { }
+ virtual void clearRootLayer() { }
virtual void attachCompositorAnimationTimeline(WebCompositorAnimationTimeline*) { }
virtual void detachCompositorAnimationTimeline(WebCompositorAnimationTimeline*) { }
// View properties ---------------------------------------------------
- virtual void setViewportSize(const WebSize& deviceViewportSize) = 0;
+ virtual void setViewportSize(const WebSize& deviceViewportSize) { }
// Gives the viewport size in physical device pixels.
- virtual WebSize deviceViewportSize() const = 0;
+ virtual WebSize deviceViewportSize() const { return WebSize(); }
- virtual void setDeviceScaleFactor(float) = 0;
- virtual float deviceScaleFactor() const = 0;
+ virtual void setDeviceScaleFactor(float) { }
+ virtual float deviceScaleFactor() const { return 0; }
// Sets the background color for the viewport.
- virtual void setBackgroundColor(WebColor) = 0;
+ virtual void setBackgroundColor(WebColor) { }
// Sets the background transparency for the viewport. The default is 'false'.
- virtual void setHasTransparentBackground(bool) = 0;
+ virtual void setHasTransparentBackground(bool) { }
// Sets whether this view is visible. In threaded mode, a view that is not visible will not
// composite or trigger updateAnimations() or layout() calls until it becomes visible.
- virtual void setVisible(bool) = 0;
+ virtual void setVisible(bool) { }
// Sets the current page scale factor and minimum / maximum limits. Both limits are initially 1 (no page scale allowed).
- virtual void setPageScaleFactorAndLimits(float pageScaleFactor, float minimum, float maximum) = 0;
+ virtual void setPageScaleFactorAndLimits(float pageScaleFactor, float minimum, float maximum) { }
// Starts an animation of the page scale to a target scale factor and scroll offset.
// If useAnchor is true, destination is a point on the screen that will remain fixed for the duration of the animation.
// If useAnchor is false, destination is the final top-left scroll position.
- virtual void startPageScaleAnimation(const WebPoint& destination, bool useAnchor, float newPageScale, double durationSec) = 0;
+ virtual void startPageScaleAnimation(const WebPoint& destination, bool useAnchor, float newPageScale, double durationSec) { }
virtual void heuristicsForGpuRasterizationUpdated(bool) { }
@@ -130,7 +130,7 @@ public:
// Blocks until the most recently composited frame has finished rendering on the GPU.
// This can have a significant performance impact and should be used with care.
- virtual void finishAllRendering() = 0;
+ virtual void finishAllRendering() { }
// Prevents updates to layer tree from becoming visible.
virtual void setDeferCommits(bool deferCommits) { }
« Source/web/tests/WebFrameTest.cpp ('K') | « Source/web/tests/WebFrameTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698