| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 | 25 |
| 26 #ifndef WebLayerTreeView_h | 26 #ifndef WebLayerTreeView_h |
| 27 #define WebLayerTreeView_h | 27 #define WebLayerTreeView_h |
| 28 | 28 |
| 29 #include "WebColor.h" | 29 #include "WebColor.h" |
| 30 #include "WebCommon.h" | 30 #include "WebCommon.h" |
| 31 #include "WebFloatPoint.h" | 31 #include "WebFloatPoint.h" |
| 32 #include "WebNonCopyable.h" | 32 #include "WebNonCopyable.h" |
| 33 #include "WebPrivateOwnPtr.h" | 33 #include "WebPrivateOwnPtr.h" |
| 34 #include "WebSize.h" | 34 #include "WebSize.h" |
| 35 #include "WebTopControlsState.h" |
| 35 | 36 |
| 36 class SkBitmap; | 37 class SkBitmap; |
| 37 | 38 |
| 38 namespace blink { | 39 namespace blink { |
| 39 | 40 |
| 40 class WebCompositeAndReadbackAsyncCallback; | 41 class WebCompositeAndReadbackAsyncCallback; |
| 41 class WebLayer; | 42 class WebLayer; |
| 42 struct WebPoint; | 43 struct WebPoint; |
| 43 struct WebSelectionBound; | 44 struct WebSelectionBound; |
| 45 class WebWidget; |
| 44 | 46 |
| 45 class WebLayerTreeView { | 47 class WebLayerTreeView { |
| 46 public: | 48 public: |
| 47 virtual ~WebLayerTreeView() { } | 49 virtual ~WebLayerTreeView() { } |
| 48 | 50 |
| 49 // Initialization and lifecycle -------------------------------------- | 51 // Initialization and lifecycle -------------------------------------- |
| 50 | 52 |
| 51 // Sets the root of the tree. The root is set by way of the constructor. | 53 // Sets the root of the tree. The root is set by way of the constructor. |
| 52 virtual void setRootLayer(const WebLayer&) = 0; | 54 virtual void setRootLayer(const WebLayer&) = 0; |
| 53 virtual void clearRootLayer() = 0; | 55 virtual void clearRootLayer() = 0; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 79 // If useAnchor is true, destination is a point on the screen that will rema
in fixed for the duration of the animation. | 81 // If useAnchor is true, destination is a point on the screen that will rema
in fixed for the duration of the animation. |
| 80 // If useAnchor is false, destination is the final top-left scroll position. | 82 // If useAnchor is false, destination is the final top-left scroll position. |
| 81 virtual void startPageScaleAnimation(const WebPoint& destination, bool useAn
chor, float newPageScale, double durationSec) = 0; | 83 virtual void startPageScaleAnimation(const WebPoint& destination, bool useAn
chor, float newPageScale, double durationSec) = 0; |
| 82 | 84 |
| 83 virtual void heuristicsForGpuRasterizationUpdated(bool) { } | 85 virtual void heuristicsForGpuRasterizationUpdated(bool) { } |
| 84 | 86 |
| 85 // Sets the amount that the top controls are showing, from 0 (hidden) to 1 | 87 // Sets the amount that the top controls are showing, from 0 (hidden) to 1 |
| 86 // (fully shown). | 88 // (fully shown). |
| 87 virtual void setTopControlsShownRatio(float) { } | 89 virtual void setTopControlsShownRatio(float) { } |
| 88 | 90 |
| 91 // Update top controls permitted and current states |
| 92 virtual void updateTopControlsState(WebTopControlsState constraints, WebTopC
ontrolsState current, bool animate) { } |
| 93 |
| 94 // Set top controls height. If |shrinkViewport| is set to true, then Blink s
hrunk the viewport clip |
| 95 // layers by the top controls height. |
| 96 virtual void setTopControlsHeight(float height, bool shrinkViewport) { } |
| 97 |
| 89 // Flow control and scheduling --------------------------------------- | 98 // Flow control and scheduling --------------------------------------- |
| 90 | 99 |
| 91 // Indicates that an animation needs to be updated. | 100 // Indicates that an animation needs to be updated. |
| 92 virtual void setNeedsAnimate() = 0; | 101 virtual void setNeedsAnimate() = 0; |
| 93 | 102 |
| 94 // Indicates whether a commit is pending. | 103 // Indicates whether a commit is pending. |
| 95 virtual bool commitRequested() const = 0; | 104 virtual bool commitRequested() const = 0; |
| 96 | 105 |
| 97 // Relays the end of a fling animation. | 106 // Relays the end of a fling animation. |
| 98 virtual void didStopFlinging() { } | 107 virtual void didStopFlinging() { } |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 // Toggles continuous painting | 150 // Toggles continuous painting |
| 142 virtual void setContinuousPaintingEnabled(bool) { } | 151 virtual void setContinuousPaintingEnabled(bool) { } |
| 143 | 152 |
| 144 // Toggles scroll bottleneck rects on the HUD layer | 153 // Toggles scroll bottleneck rects on the HUD layer |
| 145 virtual void setShowScrollBottleneckRects(bool) { } | 154 virtual void setShowScrollBottleneckRects(bool) { } |
| 146 }; | 155 }; |
| 147 | 156 |
| 148 } // namespace blink | 157 } // namespace blink |
| 149 | 158 |
| 150 #endif // WebLayerTreeView_h | 159 #endif // WebLayerTreeView_h |
| OLD | NEW |