OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2013 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. | |
4 | |
5 #ifndef WEBKIT_COMPOSITOR_BINDINGS_WEB_LAYER_TREE_VIEW_IMPL_FOR_TESTING_H_ | |
6 #define WEBKIT_COMPOSITOR_BINDINGS_WEB_LAYER_TREE_VIEW_IMPL_FOR_TESTING_H_ | |
7 | |
8 #include "base/memory/scoped_ptr.h" | |
9 #include "cc/layer_tree_host_client.h" | |
10 #include "third_party/WebKit/Source/Platform/chromium/public/WebLayerTreeView.h" | |
11 #include "webkit/compositor_bindings/webkit_compositor_bindings_export.h" | |
12 | |
13 namespace cc { | |
14 class FontAtlas; | |
15 class LayerTreeHost; | |
16 } | |
17 | |
18 namespace WebKit { | |
19 class WebLayer; | |
20 class WebLayerTreeViewClient; | |
21 class WebLayerTreeViewClientAdapter; | |
22 | |
23 class WebLayerTreeViewImplForTesting : public WebKit::WebLayerTreeView, | |
danakj
2013/02/11 18:43:03
Since there are different types of tests (pixel te
| |
24 public cc::LayerTreeHostClient { | |
25 public: | |
26 WEBKIT_COMPOSITOR_BINDINGS_EXPORT WebLayerTreeViewImplForTesting(); | |
27 virtual ~WebLayerTreeViewImplForTesting(); | |
28 | |
29 WEBKIT_COMPOSITOR_BINDINGS_EXPORT bool initialize(); | |
30 | |
31 // WebLayerTreeView implementation. | |
32 virtual void setSurfaceReady(); | |
33 virtual void setRootLayer(const WebLayer&); | |
34 virtual void clearRootLayer(); | |
35 virtual void setViewportSize(const WebSize& layout_viewport_size, | |
36 const WebSize& device_viewport_size); | |
37 virtual WebSize layoutViewportSize() const; | |
38 virtual WebSize deviceViewportSize() const; | |
39 virtual void setDeviceScaleFactor(float); | |
40 virtual float deviceScaleFactor() const; | |
41 virtual void setBackgroundColor(WebColor); | |
42 virtual void setHasTransparentBackground(bool); | |
43 virtual void setVisible(bool); | |
44 virtual void setPageScaleFactorAndLimits(float page_scale_factor, | |
45 float minimum, | |
46 float maximum); | |
47 virtual void startPageScaleAnimation(const WebPoint& destination, | |
48 bool use_anchor, float new_page_scale, | |
49 double duration_sec); | |
50 virtual void setNeedsAnimate(); | |
51 virtual void setNeedsRedraw(); | |
52 virtual bool commitRequested() const; | |
53 virtual void composite(); | |
54 virtual void updateAnimations(double frame_begin_time); | |
55 virtual void didStopFlinging(); | |
56 virtual bool compositeAndReadback(void* pixels, const WebRect&); | |
57 virtual void finishAllRendering(); | |
58 virtual void setDeferCommits(bool defer_commits); | |
59 virtual void renderingStats(WebRenderingStats&) const; | |
60 | |
61 // cc::LayerTreeHostClient implementation. | |
62 virtual void willBeginFrame() OVERRIDE; | |
63 virtual void didBeginFrame() OVERRIDE; | |
64 virtual void animate(double monotonic_frame_begin_time) OVERRIDE; | |
65 virtual void layout() OVERRIDE; | |
66 virtual void applyScrollAndScale(gfx::Vector2d scroll_delta, float page_scale) | |
67 OVERRIDE; | |
68 virtual scoped_ptr<cc::OutputSurface> createOutputSurface() OVERRIDE; | |
69 virtual void didRecreateOutputSurface(bool success) OVERRIDE; | |
70 virtual scoped_ptr<cc::InputHandler> createInputHandler() OVERRIDE; | |
71 virtual void willCommit() OVERRIDE; | |
72 virtual void didCommit() OVERRIDE; | |
73 virtual void didCommitAndDrawFrame() OVERRIDE; | |
74 virtual void didCompleteSwapBuffers() OVERRIDE; | |
75 virtual void scheduleComposite() OVERRIDE; | |
76 virtual scoped_ptr<cc::FontAtlas> createFontAtlas(); | |
77 | |
78 private: | |
79 scoped_ptr<cc::LayerTreeHost> layer_tree_host_; | |
80 }; | |
81 | |
82 } // namespace Web_kit | |
83 | |
84 #endif // WEBKIT_COMPOSITOR_BINDINGS_WEB_LAYER_TREE_VIEW_IMPL_FOR_TESTING_H_ | |
OLD | NEW |