OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_PUBLIC_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_CLIENT_H_ | 5 #ifndef CONTENT_PUBLIC_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_CLIENT_H_ |
6 #define CONTENT_PUBLIC_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_CLIENT_H_ | 6 #define CONTENT_PUBLIC_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_CLIENT_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "ui/gfx/vector2d_f.h" |
9 | 10 |
10 namespace content { | 11 namespace content { |
11 | 12 |
12 class SynchronousCompositor; | 13 class SynchronousCompositor; |
13 | 14 |
14 class SynchronousCompositorClient { | 15 class SynchronousCompositorClient { |
15 public: | 16 public: |
16 // Indication to the client that |compositor| is going out of scope, and | 17 // Indication to the client that |compositor| is going out of scope, and |
17 // must not be accessed within or after this call. | 18 // must not be accessed within or after this call. |
18 // NOTE if the client goes away before the compositor it must call | 19 // NOTE if the client goes away before the compositor it must call |
19 // SynchronousCompositor::SetClient(NULL) to release the back pointer. | 20 // SynchronousCompositor::SetClient(NULL) to release the back pointer. |
20 virtual void DidDestroyCompositor(SynchronousCompositor* compositor) = 0; | 21 virtual void DidDestroyCompositor(SynchronousCompositor* compositor) = 0; |
21 | 22 |
22 // TODO(joth): Add scroll getters and setters. | 23 // See LayerScrollOffsetDelegate for details. |
| 24 virtual void SetTotalRootLayerScrollOffset(gfx::Vector2dF new_value) = 0; |
| 25 virtual gfx::Vector2dF GetTotalRootLayerScrollOffset() = 0; |
23 | 26 |
24 // When true, should periodically call | 27 // When true, should periodically call |
25 // SynchronousCompositorOutputSurface::DemandDrawHw. Note that this value | 28 // SynchronousCompositorOutputSurface::DemandDrawHw. Note that this value |
26 // can change inside DemandDrawHw call. | 29 // can change inside DemandDrawHw call. |
27 virtual void SetContinuousInvalidate(bool invalidate) = 0; | 30 virtual void SetContinuousInvalidate(bool invalidate) = 0; |
28 | 31 |
29 protected: | 32 protected: |
30 SynchronousCompositorClient() {} | 33 SynchronousCompositorClient() {} |
31 virtual ~SynchronousCompositorClient() {} | 34 virtual ~SynchronousCompositorClient() {} |
32 | 35 |
33 private: | 36 private: |
34 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorClient); | 37 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorClient); |
35 }; | 38 }; |
36 | 39 |
37 } // namespace content | 40 } // namespace content |
38 | 41 |
39 #endif // CONTENT_PUBLIC_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_CLIENT_H_ | 42 #endif // CONTENT_PUBLIC_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_CLIENT_H_ |
OLD | NEW |