Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(895)

Side by Side Diff: webkit/compositor_bindings/web_layer_tree_view_impl_for_testing.h

Issue 12211110: Implement WebKit::WebUnitTestSupport::createLayerTreeViewForTesting() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add enum, fix NON_EXPORTED_BASE Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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,
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698