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 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 float page_scale_factor, | 355 float page_scale_factor, |
356 bool animating_transform_to_screen, | 356 bool animating_transform_to_screen, |
357 float* contents_scale_x, | 357 float* contents_scale_x, |
358 float* contents_scale_y, | 358 float* contents_scale_y, |
359 gfx::Size* content_bounds); | 359 gfx::Size* content_bounds); |
360 | 360 |
361 void SetScrollOffsetDelegate( | 361 void SetScrollOffsetDelegate( |
362 LayerScrollOffsetDelegate* scroll_offset_delegate); | 362 LayerScrollOffsetDelegate* scroll_offset_delegate); |
363 bool IsExternalFlingActive() const; | 363 bool IsExternalFlingActive() const; |
364 | 364 |
365 void SetScrollOffset(gfx::Vector2d scroll_offset); | 365 void SetScrollOffset(const gfx::Vector2d& scroll_offset); |
366 void SetScrollOffsetAndDelta(gfx::Vector2d scroll_offset, | 366 void SetScrollOffsetAndDelta(const gfx::Vector2d& scroll_offset, |
367 const gfx::Vector2dF& scroll_delta); | 367 const gfx::Vector2dF& scroll_delta); |
368 gfx::Vector2d scroll_offset() const { return scroll_offset_; } | 368 gfx::Vector2d scroll_offset() const { return scroll_offset_; } |
369 | 369 |
370 gfx::Vector2d MaxScrollOffset() const; | 370 gfx::Vector2d MaxScrollOffset() const; |
371 gfx::Vector2dF ClampScrollToMaxScrollOffset(); | 371 gfx::Vector2dF ClampScrollToMaxScrollOffset(); |
372 void SetScrollbarPosition(ScrollbarLayerImplBase* scrollbar_layer, | 372 void SetScrollbarPosition(ScrollbarLayerImplBase* scrollbar_layer, |
373 LayerImpl* scrollbar_clip_layer) const; | 373 LayerImpl* scrollbar_clip_layer) const; |
374 | |
375 void SetScrollDelta(const gfx::Vector2dF& scroll_delta); | 374 void SetScrollDelta(const gfx::Vector2dF& scroll_delta); |
376 gfx::Vector2dF ScrollDelta() const; | 375 gfx::Vector2dF ScrollDelta() const; |
377 | 376 |
378 gfx::Vector2dF TotalScrollOffset() const; | 377 gfx::Vector2dF TotalScrollOffset() const; |
379 | 378 |
380 void SetSentScrollDelta(gfx::Vector2d sent_scroll_delta); | 379 void SetSentScrollDelta(const gfx::Vector2d& sent_scroll_delta); |
381 gfx::Vector2d sent_scroll_delta() const { return sent_scroll_delta_; } | 380 gfx::Vector2d sent_scroll_delta() const { return sent_scroll_delta_; } |
382 | 381 |
383 // Returns the delta of the scroll that was outside of the bounds of the | 382 // Returns the delta of the scroll that was outside of the bounds of the |
384 // initial scroll | 383 // initial scroll |
385 gfx::Vector2dF ScrollBy(const gfx::Vector2dF& scroll); | 384 gfx::Vector2dF ScrollBy(const gfx::Vector2dF& scroll); |
386 | 385 |
387 void SetScrollClipLayer(int scroll_clip_layer_id); | 386 void SetScrollClipLayer(int scroll_clip_layer_id); |
388 bool scrollable() const { return !!scroll_clip_layer_; } | 387 bool scrollable() const { return !!scroll_clip_layer_; } |
389 | 388 |
390 void set_user_scrollable_horizontal(bool scrollable) { | 389 void set_user_scrollable_horizontal(bool scrollable) { |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
664 DrawProperties<LayerImpl> draw_properties_; | 663 DrawProperties<LayerImpl> draw_properties_; |
665 | 664 |
666 scoped_refptr<base::debug::ConvertableToTraceFormat> debug_info_; | 665 scoped_refptr<base::debug::ConvertableToTraceFormat> debug_info_; |
667 | 666 |
668 DISALLOW_COPY_AND_ASSIGN(LayerImpl); | 667 DISALLOW_COPY_AND_ASSIGN(LayerImpl); |
669 }; | 668 }; |
670 | 669 |
671 } // namespace cc | 670 } // namespace cc |
672 | 671 |
673 #endif // CC_LAYERS_LAYER_IMPL_H_ | 672 #endif // CC_LAYERS_LAYER_IMPL_H_ |
OLD | NEW |