| 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_LAYERS_LAYER_IMPL_H_ | 5 #ifndef CC_LAYERS_LAYER_IMPL_H_ |
| 6 #define CC_LAYERS_LAYER_IMPL_H_ | 6 #define CC_LAYERS_LAYER_IMPL_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 float page_scale_factor, | 361 float page_scale_factor, |
| 362 bool animating_transform_to_screen, | 362 bool animating_transform_to_screen, |
| 363 float* contents_scale_x, | 363 float* contents_scale_x, |
| 364 float* contents_scale_y, | 364 float* contents_scale_y, |
| 365 gfx::Size* content_bounds); | 365 gfx::Size* content_bounds); |
| 366 | 366 |
| 367 void SetScrollOffsetDelegate( | 367 void SetScrollOffsetDelegate( |
| 368 LayerScrollOffsetDelegate* scroll_offset_delegate); | 368 LayerScrollOffsetDelegate* scroll_offset_delegate); |
| 369 bool IsExternalFlingActive() const; | 369 bool IsExternalFlingActive() const; |
| 370 | 370 |
| 371 void SetScrollOffset(gfx::Vector2d scroll_offset); | 371 void SetScrollOffset(const gfx::Vector2d& scroll_offset); |
| 372 void SetScrollOffsetAndDelta(gfx::Vector2d scroll_offset, | 372 void SetScrollOffsetAndDelta(const gfx::Vector2d& scroll_offset, |
| 373 const gfx::Vector2dF& scroll_delta); | 373 const gfx::Vector2dF& scroll_delta); |
| 374 gfx::Vector2d scroll_offset() const { return scroll_offset_; } | 374 gfx::Vector2d scroll_offset() const { return scroll_offset_; } |
| 375 | 375 |
| 376 void SetMaxScrollOffset(gfx::Vector2d max_scroll_offset); | 376 void SetMaxScrollOffset(const gfx::Vector2d& max_scroll_offset); |
| 377 gfx::Vector2d max_scroll_offset() const { return max_scroll_offset_; } | 377 gfx::Vector2d max_scroll_offset() const { return max_scroll_offset_; } |
| 378 | 378 |
| 379 void SetScrollDelta(const gfx::Vector2dF& scroll_delta); | 379 void SetScrollDelta(const gfx::Vector2dF& scroll_delta); |
| 380 gfx::Vector2dF ScrollDelta() const; | 380 gfx::Vector2dF ScrollDelta() const; |
| 381 | 381 |
| 382 gfx::Vector2dF TotalScrollOffset() const; | 382 gfx::Vector2dF TotalScrollOffset() const; |
| 383 | 383 |
| 384 void SetSentScrollDelta(gfx::Vector2d sent_scroll_delta); | 384 void SetSentScrollDelta(const gfx::Vector2d& sent_scroll_delta); |
| 385 gfx::Vector2d sent_scroll_delta() const { return sent_scroll_delta_; } | 385 gfx::Vector2d sent_scroll_delta() const { return sent_scroll_delta_; } |
| 386 | 386 |
| 387 // Returns the delta of the scroll that was outside of the bounds of the | 387 // Returns the delta of the scroll that was outside of the bounds of the |
| 388 // initial scroll | 388 // initial scroll |
| 389 gfx::Vector2dF ScrollBy(const gfx::Vector2dF& scroll); | 389 gfx::Vector2dF ScrollBy(const gfx::Vector2dF& scroll); |
| 390 | 390 |
| 391 void SetScrollable(bool scrollable) { scrollable_ = scrollable; } | 391 void SetScrollable(bool scrollable) { scrollable_ = scrollable; } |
| 392 bool scrollable() const { return scrollable_; } | 392 bool scrollable() const { return scrollable_; } |
| 393 | 393 |
| 394 void set_user_scrollable_horizontal(bool scrollable) { | 394 void set_user_scrollable_horizontal(bool scrollable) { |
| (...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 668 DrawProperties<LayerImpl> draw_properties_; | 668 DrawProperties<LayerImpl> draw_properties_; |
| 669 | 669 |
| 670 scoped_refptr<base::debug::ConvertableToTraceFormat> debug_info_; | 670 scoped_refptr<base::debug::ConvertableToTraceFormat> debug_info_; |
| 671 | 671 |
| 672 DISALLOW_COPY_AND_ASSIGN(LayerImpl); | 672 DISALLOW_COPY_AND_ASSIGN(LayerImpl); |
| 673 }; | 673 }; |
| 674 | 674 |
| 675 } // namespace cc | 675 } // namespace cc |
| 676 | 676 |
| 677 #endif // CC_LAYERS_LAYER_IMPL_H_ | 677 #endif // CC_LAYERS_LAYER_IMPL_H_ |
| OLD | NEW |