| 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 CC_LAYER_TREE_HOST_IMPL_H_ | 5 #ifndef CC_LAYER_TREE_HOST_IMPL_H_ |
| 6 #define CC_LAYER_TREE_HOST_IMPL_H_ | 6 #define CC_LAYER_TREE_HOST_IMPL_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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 gfx::RectF bounds() const; | 79 gfx::RectF bounds() const; |
| 80 const gfx::Vector2dF& scrollDelta() const { return m_pinchViewportScrollDelt
a; } | 80 const gfx::Vector2dF& scrollDelta() const { return m_pinchViewportScrollDelt
a; } |
| 81 | 81 |
| 82 void setLayoutViewportSize(const gfx::SizeF& size) { m_layoutViewportSize =
size; } | 82 void setLayoutViewportSize(const gfx::SizeF& size) { m_layoutViewportSize =
size; } |
| 83 | 83 |
| 84 // Apply the scroll offset in layout space to the offset of the pinch-zoom v
iewport. The viewport cannot be | 84 // Apply the scroll offset in layout space to the offset of the pinch-zoom v
iewport. The viewport cannot be |
| 85 // scrolled outside of the layout viewport bounds. Returns the component of
the scroll that is un-applied due to | 85 // scrolled outside of the layout viewport bounds. Returns the component of
the scroll that is un-applied due to |
| 86 // this constraint. | 86 // this constraint. |
| 87 gfx::Vector2dF applyScroll(const gfx::Vector2dF&); | 87 gfx::Vector2dF applyScroll(const gfx::Vector2dF&); |
| 88 | 88 |
| 89 WebKit::WebTransformationMatrix implTransform() const; | 89 WebKit::WebTransformationMatrix implTransform(bool pageScalePinchZoomEnabled
) const; |
| 90 | 90 |
| 91 private: | 91 private: |
| 92 float m_pageScaleFactor; | 92 float m_pageScaleFactor; |
| 93 float m_pageScaleDelta; | 93 float m_pageScaleDelta; |
| 94 float m_sentPageScaleDelta; | 94 float m_sentPageScaleDelta; |
| 95 float m_maxPageScaleFactor; | 95 float m_maxPageScaleFactor; |
| 96 float m_minPageScaleFactor; | 96 float m_minPageScaleFactor; |
| 97 | 97 |
| 98 gfx::Vector2dF m_pinchViewportScrollDelta; | 98 gfx::Vector2dF m_pinchViewportScrollDelta; |
| 99 gfx::SizeF m_layoutViewportSize; | 99 gfx::SizeF m_layoutViewportSize; |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 | 353 |
| 354 size_t m_numImplThreadScrolls; | 354 size_t m_numImplThreadScrolls; |
| 355 size_t m_numMainThreadScrolls; | 355 size_t m_numMainThreadScrolls; |
| 356 | 356 |
| 357 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 357 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
| 358 }; | 358 }; |
| 359 | 359 |
| 360 } // namespace cc | 360 } // namespace cc |
| 361 | 361 |
| 362 #endif // CC_LAYER_TREE_HOST_IMPL_H_ | 362 #endif // CC_LAYER_TREE_HOST_IMPL_H_ |
| OLD | NEW |