| 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 15 matching lines...) Expand all Loading... |
| 26 #ifndef WebLayerTreeView_h | 26 #ifndef WebLayerTreeView_h |
| 27 #define WebLayerTreeView_h | 27 #define WebLayerTreeView_h |
| 28 | 28 |
| 29 #include "WebBrowserControlsState.h" | 29 #include "WebBrowserControlsState.h" |
| 30 #include "WebColor.h" | 30 #include "WebColor.h" |
| 31 #include "WebCommon.h" | 31 #include "WebCommon.h" |
| 32 #include "WebCompositorMutatorClient.h" | 32 #include "WebCompositorMutatorClient.h" |
| 33 #include "WebEventListenerProperties.h" | 33 #include "WebEventListenerProperties.h" |
| 34 #include "WebFloatPoint.h" | 34 #include "WebFloatPoint.h" |
| 35 #include "WebSize.h" | 35 #include "WebSize.h" |
| 36 #include "base/callback.h" |
| 36 #include "cc/surfaces/frame_sink_id.h" | 37 #include "cc/surfaces/frame_sink_id.h" |
| 37 | 38 |
| 38 namespace cc { | 39 namespace cc { |
| 39 class AnimationHost; | 40 class AnimationHost; |
| 40 } | 41 } |
| 41 | 42 |
| 42 namespace blink { | 43 namespace blink { |
| 43 | 44 |
| 44 class WebCompositeAndReadbackAsyncCallback; | 45 class WebCompositeAndReadbackAsyncCallback; |
| 45 class WebLayer; | 46 class WebLayer; |
| 46 class WebLayoutAndPaintAsyncCallback; | 47 class WebLayoutAndPaintAsyncCallback; |
| 47 struct WebPoint; | 48 struct WebPoint; |
| 48 class WebSelection; | 49 class WebSelection; |
| 49 | 50 |
| 50 class WebLayerTreeView { | 51 class WebLayerTreeView { |
| 52 using ReportTimeCallback = base::Callback<void(bool, double)>; |
| 53 |
| 51 public: | 54 public: |
| 52 virtual ~WebLayerTreeView() {} | 55 virtual ~WebLayerTreeView() {} |
| 53 | 56 |
| 54 // Initialization and lifecycle -------------------------------------- | 57 // Initialization and lifecycle -------------------------------------- |
| 55 | 58 |
| 56 // Sets the root of the tree. The root is set by way of the constructor. | 59 // Sets the root of the tree. The root is set by way of the constructor. |
| 57 virtual void SetRootLayer(const WebLayer&) {} | 60 virtual void SetRootLayer(const WebLayer&) {} |
| 58 virtual void ClearRootLayer() {} | 61 virtual void ClearRootLayer() {} |
| 59 | 62 |
| 60 // TODO(loyso): This should use CompositorAnimationHost. crbug.com/584551 | 63 // TODO(loyso): This should use CompositorAnimationHost. crbug.com/584551 |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 virtual void SetShowFPSCounter(bool) {} | 177 virtual void SetShowFPSCounter(bool) {} |
| 175 | 178 |
| 176 // Toggles the paint rects in the HUD layer | 179 // Toggles the paint rects in the HUD layer |
| 177 virtual void SetShowPaintRects(bool) {} | 180 virtual void SetShowPaintRects(bool) {} |
| 178 | 181 |
| 179 // Toggles the debug borders on layers | 182 // Toggles the debug borders on layers |
| 180 virtual void SetShowDebugBorders(bool) {} | 183 virtual void SetShowDebugBorders(bool) {} |
| 181 | 184 |
| 182 // Toggles scroll bottleneck rects on the HUD layer | 185 // Toggles scroll bottleneck rects on the HUD layer |
| 183 virtual void SetShowScrollBottleneckRects(bool) {} | 186 virtual void SetShowScrollBottleneckRects(bool) {} |
| 187 |
| 188 // ReportTimeCallback is a callback that should be fired when the |
| 189 // corresponding Swap completes (either with DidSwap or DidNotSwap). |
| 190 virtual void NotifySwapTime(ReportTimeCallback callback) {} |
| 184 }; | 191 }; |
| 185 | 192 |
| 186 } // namespace blink | 193 } // namespace blink |
| 187 | 194 |
| 188 #endif // WebLayerTreeView_h | 195 #endif // WebLayerTreeView_h |
| OLD | NEW |