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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 namespace blink { | 45 namespace blink { |
46 class WebLayerTreeView; | 46 class WebLayerTreeView; |
47 class WebScrollbarLayer; | 47 class WebScrollbarLayer; |
48 } | 48 } |
49 | 49 |
50 namespace blink { | 50 namespace blink { |
51 | 51 |
52 class FrameHost; | 52 class FrameHost; |
53 class GraphicsContext; | 53 class GraphicsContext; |
54 class GraphicsLayer; | 54 class GraphicsLayer; |
55 class GraphicsLayerFactory; | |
56 class IntRect; | 55 class IntRect; |
57 class IntSize; | 56 class IntSize; |
58 class LocalFrame; | 57 class LocalFrame; |
59 | 58 |
60 // Represents the visual viewport the user is currently seeing the page through.
This | 59 // Represents the visual viewport the user is currently seeing the page through.
This |
61 // class corresponds to the InnerViewport on the compositor. It is a ScrollableA
rea; it's | 60 // class corresponds to the InnerViewport on the compositor. It is a ScrollableA
rea; it's |
62 // offset is set through the GraphicsLayer <-> CC sync mechanisms. Its contents
is the page's | 61 // offset is set through the GraphicsLayer <-> CC sync mechanisms. Its contents
is the page's |
63 // main FrameView, which corresponds to the outer viewport. The inner viewport i
s always contained | 62 // main FrameView, which corresponds to the outer viewport. The inner viewport i
s always contained |
64 // in the outer viewport and can pan within it. | 63 // in the outer viewport and can pan within it. |
65 class CORE_EXPORT VisualViewport final : public NoBaseWillBeGarbageCollectedFina
lized<VisualViewport>, public GraphicsLayerClient, public ScrollableArea { | 64 class CORE_EXPORT VisualViewport final : public NoBaseWillBeGarbageCollectedFina
lized<VisualViewport>, public GraphicsLayerClient, public ScrollableArea { |
66 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(VisualViewport); | 65 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(VisualViewport); |
67 public: | 66 public: |
68 static PassOwnPtrWillBeRawPtr<VisualViewport> create(FrameHost& host) | 67 static PassOwnPtrWillBeRawPtr<VisualViewport> create(FrameHost& host) |
69 { | 68 { |
70 return adoptPtrWillBeNoop(new VisualViewport(host)); | 69 return adoptPtrWillBeNoop(new VisualViewport(host)); |
71 } | 70 } |
72 ~VisualViewport() override; | 71 ~VisualViewport() override; |
73 | 72 |
74 DECLARE_VIRTUAL_TRACE(); | 73 DECLARE_VIRTUAL_TRACE(); |
75 | 74 |
76 void attachToLayerTree(GraphicsLayer*, GraphicsLayerFactory*); | 75 void attachToLayerTree(GraphicsLayer*); |
| 76 |
77 GraphicsLayer* rootGraphicsLayer() | 77 GraphicsLayer* rootGraphicsLayer() |
78 { | 78 { |
79 return m_rootTransformLayer.get(); | 79 return m_rootTransformLayer.get(); |
80 } | 80 } |
81 GraphicsLayer* containerLayer() | 81 GraphicsLayer* containerLayer() |
82 { | 82 { |
83 return m_innerViewportContainerLayer.get(); | 83 return m_innerViewportContainerLayer.get(); |
84 } | 84 } |
85 GraphicsLayer* scrollLayer() | 85 GraphicsLayer* scrollLayer() |
86 { | 86 { |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 float m_scale; | 241 float m_scale; |
242 IntSize m_size; | 242 IntSize m_size; |
243 float m_topControlsAdjustment; | 243 float m_topControlsAdjustment; |
244 float m_maxPageScale; | 244 float m_maxPageScale; |
245 bool m_trackPinchZoomStatsForPage; | 245 bool m_trackPinchZoomStatsForPage; |
246 }; | 246 }; |
247 | 247 |
248 } // namespace blink | 248 } // namespace blink |
249 | 249 |
250 #endif // VisualViewport_h | 250 #endif // VisualViewport_h |
OLD | NEW |