| 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 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 379 bool IsExternalFlingActive() const; | 379 bool IsExternalFlingActive() const; |
| 380 | 380 |
| 381 void SetScrollOffset(const gfx::ScrollOffset& scroll_offset); | 381 void SetScrollOffset(const gfx::ScrollOffset& scroll_offset); |
| 382 void SetScrollOffsetAndDelta(const gfx::ScrollOffset& scroll_offset, | 382 void SetScrollOffsetAndDelta(const gfx::ScrollOffset& scroll_offset, |
| 383 const gfx::Vector2dF& scroll_delta); | 383 const gfx::Vector2dF& scroll_delta); |
| 384 gfx::ScrollOffset scroll_offset() const { return scroll_offset_; } | 384 gfx::ScrollOffset scroll_offset() const { return scroll_offset_; } |
| 385 | 385 |
| 386 gfx::ScrollOffset MaxScrollOffset() const; | 386 gfx::ScrollOffset MaxScrollOffset() const; |
| 387 gfx::Vector2dF ClampScrollToMaxScrollOffset(); | 387 gfx::Vector2dF ClampScrollToMaxScrollOffset(); |
| 388 void SetScrollbarPosition(ScrollbarLayerImplBase* scrollbar_layer, | 388 void SetScrollbarPosition(ScrollbarLayerImplBase* scrollbar_layer, |
| 389 LayerImpl* scrollbar_clip_layer) const; | 389 LayerImpl* scrollbar_clip_layer, |
| 390 bool on_resize) const; |
| 390 void SetScrollDelta(const gfx::Vector2dF& scroll_delta); | 391 void SetScrollDelta(const gfx::Vector2dF& scroll_delta); |
| 391 gfx::Vector2dF ScrollDelta() const; | 392 gfx::Vector2dF ScrollDelta() const; |
| 392 | 393 |
| 393 gfx::ScrollOffset TotalScrollOffset() const; | 394 gfx::ScrollOffset TotalScrollOffset() const; |
| 394 | 395 |
| 395 void SetSentScrollDelta(const gfx::Vector2dF& sent_scroll_delta); | 396 void SetSentScrollDelta(const gfx::Vector2dF& sent_scroll_delta); |
| 396 gfx::Vector2dF sent_scroll_delta() const { return sent_scroll_delta_; } | 397 gfx::Vector2dF sent_scroll_delta() const { return sent_scroll_delta_; } |
| 397 | 398 |
| 398 // Returns the delta of the scroll that was outside of the bounds of the | 399 // Returns the delta of the scroll that was outside of the bounds of the |
| 399 // initial scroll | 400 // initial scroll |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 506 ScrollbarAnimationController* scrollbar_animation_controller() const { | 507 ScrollbarAnimationController* scrollbar_animation_controller() const { |
| 507 return scrollbar_animation_controller_.get(); | 508 return scrollbar_animation_controller_.get(); |
| 508 } | 509 } |
| 509 | 510 |
| 510 typedef std::set<ScrollbarLayerImplBase*> ScrollbarSet; | 511 typedef std::set<ScrollbarLayerImplBase*> ScrollbarSet; |
| 511 ScrollbarSet* scrollbars() { return scrollbars_.get(); } | 512 ScrollbarSet* scrollbars() { return scrollbars_.get(); } |
| 512 void ClearScrollbars(); | 513 void ClearScrollbars(); |
| 513 void AddScrollbar(ScrollbarLayerImplBase* layer); | 514 void AddScrollbar(ScrollbarLayerImplBase* layer); |
| 514 void RemoveScrollbar(ScrollbarLayerImplBase* layer); | 515 void RemoveScrollbar(ScrollbarLayerImplBase* layer); |
| 515 bool HasScrollbar(ScrollbarOrientation orientation) const; | 516 bool HasScrollbar(ScrollbarOrientation orientation) const; |
| 516 void ScrollbarParametersDidChange(); | 517 void ScrollbarParametersDidChange(bool on_resize); |
| 517 | 518 |
| 518 gfx::Rect LayerRectToContentRect(const gfx::RectF& layer_rect) const; | 519 gfx::Rect LayerRectToContentRect(const gfx::RectF& layer_rect) const; |
| 519 | 520 |
| 520 virtual skia::RefPtr<SkPicture> GetPicture(); | 521 virtual skia::RefPtr<SkPicture> GetPicture(); |
| 521 | 522 |
| 522 virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl); | 523 virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl); |
| 523 virtual void PushPropertiesTo(LayerImpl* layer); | 524 virtual void PushPropertiesTo(LayerImpl* layer); |
| 524 | 525 |
| 525 virtual void GetAllTilesForTracing(std::set<const Tile*>* tiles) const; | 526 virtual void GetAllTilesForTracing(std::set<const Tile*>* tiles) const; |
| 526 virtual void AsValueInto(base::debug::TracedValue* dict) const; | 527 virtual void AsValueInto(base::debug::TracedValue* dict) const; |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 703 DrawProperties<LayerImpl> draw_properties_; | 704 DrawProperties<LayerImpl> draw_properties_; |
| 704 | 705 |
| 705 scoped_refptr<base::debug::ConvertableToTraceFormat> debug_info_; | 706 scoped_refptr<base::debug::ConvertableToTraceFormat> debug_info_; |
| 706 | 707 |
| 707 DISALLOW_COPY_AND_ASSIGN(LayerImpl); | 708 DISALLOW_COPY_AND_ASSIGN(LayerImpl); |
| 708 }; | 709 }; |
| 709 | 710 |
| 710 } // namespace cc | 711 } // namespace cc |
| 711 | 712 |
| 712 #endif // CC_LAYERS_LAYER_IMPL_H_ | 713 #endif // CC_LAYERS_LAYER_IMPL_H_ |
| OLD | NEW |