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 #include <vector> | 10 #include <vector> |
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
415 scroll_compensation_adjustment_ = scroll_offset; | 415 scroll_compensation_adjustment_ = scroll_offset; |
416 } | 416 } |
417 gfx::Vector2dF ScrollCompensationAdjustment() const { | 417 gfx::Vector2dF ScrollCompensationAdjustment() const { |
418 return scroll_compensation_adjustment_; | 418 return scroll_compensation_adjustment_; |
419 } | 419 } |
420 | 420 |
421 // Returns the delta of the scroll that was outside of the bounds of the | 421 // Returns the delta of the scroll that was outside of the bounds of the |
422 // initial scroll | 422 // initial scroll |
423 gfx::Vector2dF ScrollBy(const gfx::Vector2dF& scroll); | 423 gfx::Vector2dF ScrollBy(const gfx::Vector2dF& scroll); |
424 | 424 |
425 // TODO(aelias): Delete these three methods after doing a mass rename in | |
426 // tests. | |
427 gfx::ScrollOffset TotalScrollOffset() const { return CurrentScrollOffset(); } | |
428 void SetScrollOffset(const gfx::ScrollOffset& scroll_offset) { | |
429 PushScrollOffsetFromMainThread(scroll_offset); | |
430 } | |
431 gfx::ScrollOffset scroll_offset() const { return BaseScrollOffset(); } | |
432 | |
433 void SetScrollClipLayer(int scroll_clip_layer_id); | 425 void SetScrollClipLayer(int scroll_clip_layer_id); |
434 LayerImpl* scroll_clip_layer() const { return scroll_clip_layer_; } | 426 LayerImpl* scroll_clip_layer() const { return scroll_clip_layer_; } |
435 bool scrollable() const { return !!scroll_clip_layer_; } | 427 bool scrollable() const { return !!scroll_clip_layer_; } |
436 | 428 |
437 void set_user_scrollable_horizontal(bool scrollable) { | 429 void set_user_scrollable_horizontal(bool scrollable) { |
438 user_scrollable_horizontal_ = scrollable; | 430 user_scrollable_horizontal_ = scrollable; |
439 } | 431 } |
440 bool user_scrollable_horizontal() const { | 432 bool user_scrollable_horizontal() const { |
441 return user_scrollable_horizontal_; | 433 return user_scrollable_horizontal_; |
442 } | 434 } |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
757 | 749 |
758 std::vector<FrameTimingRequest> frame_timing_requests_; | 750 std::vector<FrameTimingRequest> frame_timing_requests_; |
759 bool frame_timing_requests_dirty_; | 751 bool frame_timing_requests_dirty_; |
760 | 752 |
761 DISALLOW_COPY_AND_ASSIGN(LayerImpl); | 753 DISALLOW_COPY_AND_ASSIGN(LayerImpl); |
762 }; | 754 }; |
763 | 755 |
764 } // namespace cc | 756 } // namespace cc |
765 | 757 |
766 #endif // CC_LAYERS_LAYER_IMPL_H_ | 758 #endif // CC_LAYERS_LAYER_IMPL_H_ |
OLD | NEW |