Experimental push messaging api reference docs.
[chromium-blink-merge.git] / cc / CCLayerTreeHostClient.h
blob52c5bc070fc0b9f08970e56fc60768081cfe33d3
1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CCLayerTreeHostClient_h
6 #define CCLayerTreeHostClient_h
8 #include <wtf/PassOwnPtr.h>
10 namespace WebKit {
11 class WebCompositorOutputSurface;
14 namespace cc {
15 class CCInputHandler;
16 class IntSize;
18 class CCLayerTreeHostClient {
19 public:
20 virtual void willBeginFrame() = 0;
21 // Marks finishing compositing-related tasks on the main thread. In threaded mode, this corresponds to didCommit().
22 virtual void didBeginFrame() = 0;
23 virtual void animate(double frameBeginTime) = 0;
24 virtual void layout() = 0;
25 virtual void applyScrollAndScale(const IntSize& scrollDelta, float pageScale) = 0;
26 virtual PassOwnPtr<WebKit::WebCompositorOutputSurface> createOutputSurface() = 0;
27 virtual void didRecreateOutputSurface(bool success) = 0;
28 virtual PassOwnPtr<CCInputHandler> createInputHandler() = 0;
29 virtual void willCommit() = 0;
30 virtual void didCommit() = 0;
31 virtual void didCommitAndDrawFrame() = 0;
32 virtual void didCompleteSwapBuffers() = 0;
34 // Used only in the single-threaded path.
35 virtual void scheduleComposite() = 0;
37 protected:
38 virtual ~CCLayerTreeHostClient() { }
43 #endif // CCLayerTreeHostClient_h