OLD | NEW |
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CCLayerTreeHostImpl_h | 5 #ifndef CCLayerTreeHostImpl_h |
6 #define CCLayerTreeHostImpl_h | 6 #define CCLayerTreeHostImpl_h |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/time.h" | 10 #include "base/time.h" |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 | 76 |
77 // Returns the bounds and offset of the scaled and translated viewport to us
e for pinch-zoom. | 77 // Returns the bounds and offset of the scaled and translated viewport to us
e for pinch-zoom. |
78 gfx::RectF bounds() const; | 78 gfx::RectF bounds() const; |
79 const FloatPoint& scrollDelta() const { return m_pinchViewportScrollDelta; } | 79 const FloatPoint& scrollDelta() const { return m_pinchViewportScrollDelta; } |
80 | 80 |
81 void setLayoutViewportSize(const gfx::SizeF& size) { m_layoutViewportSize =
size; } | 81 void setLayoutViewportSize(const gfx::SizeF& size) { m_layoutViewportSize =
size; } |
82 | 82 |
83 // Apply the scroll offset in layout space to the offset of the pinch-zoom v
iewport. The viewport cannot be | 83 // Apply the scroll offset in layout space to the offset of the pinch-zoom v
iewport. The viewport cannot be |
84 // scrolled outside of the layout viewport bounds. Returns the component of
the scroll that is un-applied due to | 84 // scrolled outside of the layout viewport bounds. Returns the component of
the scroll that is un-applied due to |
85 // this constraint. | 85 // this constraint. |
86 FloatSize applyScroll(FloatSize&); | 86 FloatSize applyScroll(const gfx::Vector2dF&); |
87 | 87 |
88 WebKit::WebTransformationMatrix implTransform() const; | 88 WebKit::WebTransformationMatrix implTransform() const; |
89 | 89 |
90 private: | 90 private: |
91 float m_pageScaleFactor; | 91 float m_pageScaleFactor; |
92 float m_pageScaleDelta; | 92 float m_pageScaleDelta; |
93 float m_sentPageScaleDelta; | 93 float m_sentPageScaleDelta; |
94 float m_maxPageScaleFactor; | 94 float m_maxPageScaleFactor; |
95 float m_minPageScaleFactor; | 95 float m_minPageScaleFactor; |
96 | 96 |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
352 | 352 |
353 size_t m_numImplThreadScrolls; | 353 size_t m_numImplThreadScrolls; |
354 size_t m_numMainThreadScrolls; | 354 size_t m_numMainThreadScrolls; |
355 | 355 |
356 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 356 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
357 }; | 357 }; |
358 | 358 |
359 } // namespace cc | 359 } // namespace cc |
360 | 360 |
361 #endif | 361 #endif |
OLD | NEW |