| OLD | NEW |
| (Empty) |
| 1 // Copyright 2011 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 WebLayerTreeViewImpl_h | |
| 6 #define WebLayerTreeViewImpl_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 | |
| 12 namespace cc { | |
| 13 class CCLayerTreeHost; | |
| 14 } | |
| 15 | |
| 16 namespace WebKit { | |
| 17 class WebLayer; | |
| 18 class WebLayerTreeViewClient; | |
| 19 class WebLayerTreeViewClientAdapter; | |
| 20 | |
| 21 class WebLayerTreeViewImpl : public WebLayerTreeView, public cc::CCLayerTreeHost
Client { | |
| 22 public: | |
| 23 explicit WebLayerTreeViewImpl(WebLayerTreeViewClient*); | |
| 24 virtual ~WebLayerTreeViewImpl(); | |
| 25 | |
| 26 bool initialize(const Settings&); | |
| 27 | |
| 28 // WebLayerTreeView implementation. | |
| 29 virtual void setSurfaceReady() OVERRIDE; | |
| 30 virtual void setRootLayer(const WebLayer&) OVERRIDE; | |
| 31 virtual void clearRootLayer() OVERRIDE; | |
| 32 virtual void setViewportSize(const WebSize& layoutViewportSize, const WebSiz
e& deviceViewportSize = WebSize()) OVERRIDE; | |
| 33 virtual WebSize layoutViewportSize() const OVERRIDE; | |
| 34 virtual WebSize deviceViewportSize() const OVERRIDE; | |
| 35 virtual void setDeviceScaleFactor(float) OVERRIDE; | |
| 36 virtual float deviceScaleFactor() const OVERRIDE; | |
| 37 virtual void setBackgroundColor(WebColor) OVERRIDE; | |
| 38 virtual void setHasTransparentBackground(bool) OVERRIDE; | |
| 39 virtual void setVisible(bool) OVERRIDE; | |
| 40 virtual void setPageScaleFactorAndLimits(float pageScaleFactor, float minimu
m, float maximum) OVERRIDE; | |
| 41 virtual void startPageScaleAnimation(const WebPoint& destination, bool useAn
chor, float newPageScale, double durationSec) OVERRIDE; | |
| 42 virtual void setNeedsAnimate() OVERRIDE; | |
| 43 virtual void setNeedsRedraw() OVERRIDE; | |
| 44 virtual bool commitRequested() const OVERRIDE; | |
| 45 virtual void composite() OVERRIDE; | |
| 46 virtual void updateAnimations(double frameBeginTime) OVERRIDE; | |
| 47 virtual bool compositeAndReadback(void *pixels, const WebRect&) OVERRIDE; | |
| 48 virtual void finishAllRendering() OVERRIDE; | |
| 49 virtual void renderingStats(WebRenderingStats&) const OVERRIDE; | |
| 50 virtual void setFontAtlas(SkBitmap, WebRect asciiToRectTable[128], int fontH
eight) OVERRIDE; | |
| 51 virtual void loseCompositorContext(int numTimes) OVERRIDE; | |
| 52 | |
| 53 // cc::CCLayerTreeHostClient implementation. | |
| 54 virtual void willBeginFrame() OVERRIDE; | |
| 55 virtual void didBeginFrame() OVERRIDE; | |
| 56 virtual void animate(double monotonicFrameBeginTime) OVERRIDE; | |
| 57 virtual void layout() OVERRIDE; | |
| 58 virtual void applyScrollAndScale(const cc::IntSize& scrollDelta, float pageS
cale) OVERRIDE; | |
| 59 virtual scoped_ptr<WebCompositorOutputSurface> createOutputSurface() OVERRID
E; | |
| 60 virtual void didRecreateOutputSurface(bool success) OVERRIDE; | |
| 61 virtual scoped_ptr<cc::CCInputHandler> createInputHandler() OVERRIDE; | |
| 62 virtual void willCommit() OVERRIDE; | |
| 63 virtual void didCommit() OVERRIDE; | |
| 64 virtual void didCommitAndDrawFrame() OVERRIDE; | |
| 65 virtual void didCompleteSwapBuffers() OVERRIDE; | |
| 66 virtual void scheduleComposite() OVERRIDE; | |
| 67 | |
| 68 private: | |
| 69 WebLayerTreeViewClient* m_client; | |
| 70 scoped_ptr<cc::CCLayerTreeHost> m_layerTreeHost; | |
| 71 }; | |
| 72 | |
| 73 } // namespace WebKit | |
| 74 | |
| 75 #endif // WebLayerTreeViewImpl_h | |
| OLD | NEW |