Chromium Code Reviews| 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 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 377 bool IsExternalFlingActive() const; | 377 bool IsExternalFlingActive() const; |
| 378 | 378 |
| 379 void SetScrollOffset(const gfx::Vector2d& scroll_offset); | 379 void SetScrollOffset(const gfx::Vector2d& scroll_offset); |
| 380 void SetScrollOffsetAndDelta(const gfx::Vector2d& scroll_offset, | 380 void SetScrollOffsetAndDelta(const gfx::Vector2d& scroll_offset, |
| 381 const gfx::Vector2dF& scroll_delta); | 381 const gfx::Vector2dF& scroll_delta); |
| 382 gfx::Vector2d scroll_offset() const { return scroll_offset_; } | 382 gfx::Vector2d scroll_offset() const { return scroll_offset_; } |
| 383 | 383 |
| 384 gfx::Vector2d MaxScrollOffset() const; | 384 gfx::Vector2d MaxScrollOffset() const; |
| 385 gfx::Vector2dF ClampScrollToMaxScrollOffset(); | 385 gfx::Vector2dF ClampScrollToMaxScrollOffset(); |
| 386 void SetScrollbarPosition(ScrollbarLayerImplBase* scrollbar_layer, | 386 void SetScrollbarPosition(ScrollbarLayerImplBase* scrollbar_layer, |
| 387 LayerImpl* scrollbar_clip_layer) const; | 387 LayerImpl* scrollbar_clip_layer, |
| 388 bool on_resize) const; | |
| 388 void SetScrollDelta(const gfx::Vector2dF& scroll_delta); | 389 void SetScrollDelta(const gfx::Vector2dF& scroll_delta); |
| 389 gfx::Vector2dF ScrollDelta() const; | 390 gfx::Vector2dF ScrollDelta() const; |
| 390 | 391 |
| 391 gfx::Vector2dF TotalScrollOffset() const; | 392 gfx::Vector2dF TotalScrollOffset() const; |
| 392 | 393 |
| 393 void SetSentScrollDelta(const gfx::Vector2d& sent_scroll_delta); | 394 void SetSentScrollDelta(const gfx::Vector2d& sent_scroll_delta); |
| 394 gfx::Vector2d sent_scroll_delta() const { return sent_scroll_delta_; } | 395 gfx::Vector2d sent_scroll_delta() const { return sent_scroll_delta_; } |
| 395 | 396 |
| 396 // Returns the delta of the scroll that was outside of the bounds of the | 397 // Returns the delta of the scroll that was outside of the bounds of the |
| 397 // initial scroll | 398 // initial scroll |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 504 ScrollbarAnimationController* scrollbar_animation_controller() const { | 505 ScrollbarAnimationController* scrollbar_animation_controller() const { |
| 505 return scrollbar_animation_controller_.get(); | 506 return scrollbar_animation_controller_.get(); |
| 506 } | 507 } |
| 507 | 508 |
| 508 typedef std::set<ScrollbarLayerImplBase*> ScrollbarSet; | 509 typedef std::set<ScrollbarLayerImplBase*> ScrollbarSet; |
| 509 ScrollbarSet* scrollbars() { return scrollbars_.get(); } | 510 ScrollbarSet* scrollbars() { return scrollbars_.get(); } |
| 510 void ClearScrollbars(); | 511 void ClearScrollbars(); |
| 511 void AddScrollbar(ScrollbarLayerImplBase* layer); | 512 void AddScrollbar(ScrollbarLayerImplBase* layer); |
| 512 void RemoveScrollbar(ScrollbarLayerImplBase* layer); | 513 void RemoveScrollbar(ScrollbarLayerImplBase* layer); |
| 513 bool HasScrollbar(ScrollbarOrientation orientation) const; | 514 bool HasScrollbar(ScrollbarOrientation orientation) const; |
| 514 void ScrollbarParametersDidChange(); | 515 void ScrollbarParametersDidChange(bool on_resize = false); |
|
aelias_OOO_until_Jul13
2014/09/30 18:55:28
Because you can remove the argument in SetScrollba
MuVen
2014/10/01 16:45:51
Done.
| |
| 515 int clip_height() { | 516 int clip_height() { |
| 516 return scroll_clip_layer_ ? scroll_clip_layer_->bounds().height() : 0; | 517 return scroll_clip_layer_ ? scroll_clip_layer_->bounds().height() : 0; |
| 517 } | 518 } |
| 518 | 519 |
| 519 gfx::Rect LayerRectToContentRect(const gfx::RectF& layer_rect) const; | 520 gfx::Rect LayerRectToContentRect(const gfx::RectF& layer_rect) const; |
| 520 | 521 |
| 521 virtual skia::RefPtr<SkPicture> GetPicture(); | 522 virtual skia::RefPtr<SkPicture> GetPicture(); |
| 522 | 523 |
| 523 virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl); | 524 virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl); |
| 524 virtual void PushPropertiesTo(LayerImpl* layer); | 525 virtual void PushPropertiesTo(LayerImpl* layer); |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 704 DrawProperties<LayerImpl> draw_properties_; | 705 DrawProperties<LayerImpl> draw_properties_; |
| 705 | 706 |
| 706 scoped_refptr<base::debug::ConvertableToTraceFormat> debug_info_; | 707 scoped_refptr<base::debug::ConvertableToTraceFormat> debug_info_; |
| 707 | 708 |
| 708 DISALLOW_COPY_AND_ASSIGN(LayerImpl); | 709 DISALLOW_COPY_AND_ASSIGN(LayerImpl); |
| 709 }; | 710 }; |
| 710 | 711 |
| 711 } // namespace cc | 712 } // namespace cc |
| 712 | 713 |
| 713 #endif // CC_LAYERS_LAYER_IMPL_H_ | 714 #endif // CC_LAYERS_LAYER_IMPL_H_ |
| OLD | NEW |