| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 #include "wtf/OwnPtr.h" | 38 #include "wtf/OwnPtr.h" |
| 39 #include "wtf/PassOwnPtr.h" | 39 #include "wtf/PassOwnPtr.h" |
| 40 | 40 |
| 41 namespace WebCore { | 41 namespace WebCore { |
| 42 class GraphicsContext; | 42 class GraphicsContext; |
| 43 class GraphicsLayer; | 43 class GraphicsLayer; |
| 44 class IntRect; | 44 class IntRect; |
| 45 class IntSize; | 45 class IntSize; |
| 46 } | 46 } |
| 47 | 47 |
| 48 namespace WebKit { | 48 namespace blink { |
| 49 | 49 |
| 50 class WebLayerTreeView; | 50 class WebLayerTreeView; |
| 51 class WebScrollbarLayer; | 51 class WebScrollbarLayer; |
| 52 class WebViewImpl; | 52 class WebViewImpl; |
| 53 | 53 |
| 54 class PinchViewports : WebCore::GraphicsLayerClient { | 54 class PinchViewports : WebCore::GraphicsLayerClient { |
| 55 public: | 55 public: |
| 56 static PassOwnPtr<PinchViewports> create(WebViewImpl* owner); | 56 static PassOwnPtr<PinchViewports> create(WebViewImpl* owner); |
| 57 ~PinchViewports(); | 57 ~PinchViewports(); |
| 58 | 58 |
| 59 void setOverflowControlsHostLayer(WebCore::GraphicsLayer*); | 59 void setOverflowControlsHostLayer(WebCore::GraphicsLayer*); |
| 60 WebCore::GraphicsLayer* rootGraphicsLayer() | 60 WebCore::GraphicsLayer* rootGraphicsLayer() |
| 61 { | 61 { |
| 62 return m_innerViewportContainerLayer.get(); | 62 return m_innerViewportContainerLayer.get(); |
| 63 } | 63 } |
| 64 void setViewportSize(const WebCore::IntSize&); | 64 void setViewportSize(const WebCore::IntSize&); |
| 65 | 65 |
| 66 void registerViewportLayersWithTreeView(WebLayerTreeView*) const; | 66 void registerViewportLayersWithTreeView(WebLayerTreeView*) const; |
| 67 void clearViewportLayersForTreeView(WebLayerTreeView*) const; | 67 void clearViewportLayersForTreeView(WebLayerTreeView*) const; |
| 68 | 68 |
| 69 // GraphicsLayerClient implementation. | 69 // GraphicsLayerClient implementation. |
| 70 virtual void notifyAnimationStarted(const WebCore::GraphicsLayer*, double ti
me) OVERRIDE; | 70 virtual void notifyAnimationStarted(const WebCore::GraphicsLayer*, double ti
me) OVERRIDE; |
| 71 virtual void paintContents(const WebCore::GraphicsLayer*, WebCore::GraphicsC
ontext&, WebCore::GraphicsLayerPaintingPhase, const WebCore::IntRect& inClip) OV
ERRIDE; | 71 virtual void paintContents(const WebCore::GraphicsLayer*, WebCore::GraphicsC
ontext&, WebCore::GraphicsLayerPaintingPhase, const WebCore::IntRect& inClip) OV
ERRIDE; |
| 72 | 72 |
| 73 virtual String debugName(const WebCore::GraphicsLayer*) OVERRIDE; | 73 virtual String debugName(const WebCore::GraphicsLayer*) OVERRIDE; |
| 74 | 74 |
| 75 private: | 75 private: |
| 76 explicit PinchViewports(WebViewImpl* owner); | 76 explicit PinchViewports(WebViewImpl* owner); |
| 77 | 77 |
| 78 void setupScrollbar(WebKit::WebScrollbar::Orientation); | 78 void setupScrollbar(blink::WebScrollbar::Orientation); |
| 79 | 79 |
| 80 WebViewImpl* m_owner; | 80 WebViewImpl* m_owner; |
| 81 OwnPtr<WebCore::GraphicsLayer> m_innerViewportContainerLayer; | 81 OwnPtr<WebCore::GraphicsLayer> m_innerViewportContainerLayer; |
| 82 OwnPtr<WebCore::GraphicsLayer> m_pageScaleLayer; | 82 OwnPtr<WebCore::GraphicsLayer> m_pageScaleLayer; |
| 83 OwnPtr<WebCore::GraphicsLayer> m_innerViewportScrollLayer; | 83 OwnPtr<WebCore::GraphicsLayer> m_innerViewportScrollLayer; |
| 84 OwnPtr<WebCore::GraphicsLayer> m_overlayScrollbarHorizontal; | 84 OwnPtr<WebCore::GraphicsLayer> m_overlayScrollbarHorizontal; |
| 85 OwnPtr<WebCore::GraphicsLayer> m_overlayScrollbarVertical; | 85 OwnPtr<WebCore::GraphicsLayer> m_overlayScrollbarVertical; |
| 86 OwnPtr<WebScrollbarLayer> m_webOverlayScrollbarHorizontal; | 86 OwnPtr<WebScrollbarLayer> m_webOverlayScrollbarHorizontal; |
| 87 OwnPtr<WebScrollbarLayer> m_webOverlayScrollbarVertical; | 87 OwnPtr<WebScrollbarLayer> m_webOverlayScrollbarVertical; |
| 88 }; | 88 }; |
| 89 | 89 |
| 90 } // namespace WebKit | 90 } // namespace blink |
| 91 | 91 |
| 92 #endif // PinchViewports_h | 92 #endif // PinchViewports_h |
| OLD | NEW |