Add intro to any Chrome app API with no overview docs.
[chromium-blink-merge.git] / cc / layer_tree_host_client.h
blobf6cb7028ab18606bdeca5d4e0c38107e6bc453fb
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 CC_LAYER_TREE_HOST_CLIENT_H_
6 #define CC_LAYER_TREE_HOST_CLIENT_H_
8 #include "base/memory/scoped_ptr.h"
10 namespace gfx {
11 class Vector2d;
14 namespace WebKit {
15 class WebCompositorOutputSurface;
18 namespace cc {
19 class InputHandler;
21 class LayerTreeHostClient {
22 public:
23 virtual void willBeginFrame() = 0;
24 // Marks finishing compositing-related tasks on the main thread. In threaded mode, this corresponds to didCommit().
25 virtual void didBeginFrame() = 0;
26 virtual void animate(double frameBeginTime) = 0;
27 virtual void layout() = 0;
28 virtual void applyScrollAndScale(gfx::Vector2d scrollDelta, float pageScale) = 0;
29 virtual scoped_ptr<WebKit::WebCompositorOutputSurface> createOutputSurface() = 0;
30 virtual void didRecreateOutputSurface(bool success) = 0;
31 virtual scoped_ptr<InputHandler> createInputHandler() = 0;
32 virtual void willCommit() = 0;
33 virtual void didCommit() = 0;
34 virtual void didCommitAndDrawFrame() = 0;
35 virtual void didCompleteSwapBuffers() = 0;
37 // Used only in the single-threaded path.
38 virtual void scheduleComposite() = 0;
40 protected:
41 virtual ~LayerTreeHostClient() { }
46 #endif // CC_LAYER_TREE_HOST_CLIENT_H_