Chromium Code Reviews| 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 "public/web/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 // If this is set to true, then the embedder shrunk the WebView size by the top | |
|
aelias_OOO_until_Jul13
2015/02/13 02:03:17
Please update the comment to say that this means B
majidvp
2015/02/18 21:03:57
Done.
| |
| 95 // controls height. | |
| 96 virtual void setTopControlsShrinkBlinkSize(bool shrink) { } | |
| 97 | |
| 98 // Set top controls height | |
| 99 virtual void setTopControlsHeight(float height) { } | |
| 100 | |
| 89 // Flow control and scheduling --------------------------------------- | 101 // Flow control and scheduling --------------------------------------- |
| 90 | 102 |
| 91 // Indicates that an animation needs to be updated. | 103 // Indicates that an animation needs to be updated. |
| 92 virtual void setNeedsAnimate() = 0; | 104 virtual void setNeedsAnimate() = 0; |
| 93 | 105 |
| 94 // Indicates whether a commit is pending. | 106 // Indicates whether a commit is pending. |
| 95 virtual bool commitRequested() const = 0; | 107 virtual bool commitRequested() const = 0; |
| 96 | 108 |
| 97 // Relays the end of a fling animation. | 109 // Relays the end of a fling animation. |
| 98 virtual void didStopFlinging() { } | 110 virtual void didStopFlinging() { } |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 141 // Toggles continuous painting | 153 // Toggles continuous painting |
| 142 virtual void setContinuousPaintingEnabled(bool) { } | 154 virtual void setContinuousPaintingEnabled(bool) { } |
| 143 | 155 |
| 144 // Toggles scroll bottleneck rects on the HUD layer | 156 // Toggles scroll bottleneck rects on the HUD layer |
| 145 virtual void setShowScrollBottleneckRects(bool) { } | 157 virtual void setShowScrollBottleneckRects(bool) { } |
| 146 }; | 158 }; |
| 147 | 159 |
| 148 } // namespace blink | 160 } // namespace blink |
| 149 | 161 |
| 150 #endif // WebLayerTreeView_h | 162 #endif // WebLayerTreeView_h |
| OLD | NEW |