Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1193)

Unified Diff: cc/layers/layer_impl.h

Issue 146713002: Revert of Pinch/Zoom Infrastructure & Plumbing CL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/layers/layer.cc ('k') | cc/layers/layer_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/layer_impl.h
diff --git a/cc/layers/layer_impl.h b/cc/layers/layer_impl.h
index 7ad2915de4d8d241bc298ab12ce3bdcc04380c7e..75f02ec95dd898d04f68dca62d69e40a23a88802 100644
--- a/cc/layers/layer_impl.h
+++ b/cc/layers/layer_impl.h
@@ -373,10 +373,8 @@
const gfx::Vector2dF& scroll_delta);
gfx::Vector2d scroll_offset() const { return scroll_offset_; }
- gfx::Vector2d MaxScrollOffset() const;
- gfx::Vector2dF ClampScrollToMaxScrollOffset();
- void SetScrollbarPosition(ScrollbarLayerImplBase* scrollbar_layer,
- LayerImpl* scrollbar_clip_layer) const;
+ void SetMaxScrollOffset(gfx::Vector2d max_scroll_offset);
+ gfx::Vector2d max_scroll_offset() const { return max_scroll_offset_; }
void SetScrollDelta(const gfx::Vector2dF& scroll_delta);
gfx::Vector2dF ScrollDelta() const;
@@ -390,8 +388,8 @@
// initial scroll
gfx::Vector2dF ScrollBy(const gfx::Vector2dF& scroll);
- void SetScrollClipLayer(int scroll_clip_layer_id);
- bool scrollable() const { return !!scroll_clip_layer_; }
+ void SetScrollable(bool scrollable) { scrollable_ = scrollable; }
+ bool scrollable() const { return scrollable_; }
void set_user_scrollable_horizontal(bool scrollable) {
user_scrollable_horizontal_ = scrollable;
@@ -481,15 +479,14 @@
return scrollbar_animation_controller_.get();
}
- typedef std::set<ScrollbarLayerImplBase*> ScrollbarSet;
- ScrollbarSet* scrollbars() { return scrollbars_.get(); }
- void ClearScrollbars();
- void AddScrollbar(ScrollbarLayerImplBase* layer);
- void RemoveScrollbar(ScrollbarLayerImplBase* layer);
- bool HasScrollbar(ScrollbarOrientation orientation) const;
- void ScrollbarParametersDidChange();
- int clip_height() {
- return scroll_clip_layer_ ? scroll_clip_layer_->bounds().height() : 0;
+ void SetHorizontalScrollbarLayer(ScrollbarLayerImplBase* scrollbar_layer);
+ ScrollbarLayerImplBase* horizontal_scrollbar_layer() {
+ return horizontal_scrollbar_layer_;
+ }
+
+ void SetVerticalScrollbarLayer(ScrollbarLayerImplBase* scrollbar_layer);
+ ScrollbarLayerImplBase* vertical_scrollbar_layer() {
+ return vertical_scrollbar_layer_;
}
gfx::Rect LayerRectToContentRect(const gfx::RectF& layer_rect) const;
@@ -547,6 +544,8 @@
private:
void NoteLayerPropertyChangedForDescendantsInternal();
+ void UpdateScrollbarPositions();
+
virtual const char* LayerTypeAsString() const;
// Properties internal to LayerImpl
@@ -579,7 +578,6 @@
gfx::Size bounds_;
gfx::Vector2d scroll_offset_;
LayerScrollOffsetDelegate* scroll_offset_delegate_;
- LayerImpl* scroll_clip_layer_;
bool scrollable_ : 1;
bool should_scroll_on_main_thread_ : 1;
bool have_wheel_event_handlers_ : 1;
@@ -622,6 +620,7 @@
gfx::Vector2dF scroll_delta_;
gfx::Vector2d sent_scroll_delta_;
+ gfx::Vector2d max_scroll_offset_;
gfx::Vector2dF last_scroll_offset_;
// The global depth value of the center of the layer. This value is used
@@ -657,7 +656,10 @@
// Manages scrollbars for this layer
scoped_ptr<ScrollbarAnimationController> scrollbar_animation_controller_;
- scoped_ptr<ScrollbarSet> scrollbars_;
+ // Weak pointers to this layer's scrollbars, if it has them. Updated during
+ // tree synchronization.
+ ScrollbarLayerImplBase* horizontal_scrollbar_layer_;
+ ScrollbarLayerImplBase* vertical_scrollbar_layer_;
ScopedPtrVector<CopyOutputRequest> copy_requests_;
« no previous file with comments | « cc/layers/layer.cc ('k') | cc/layers/layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698