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

Side by Side Diff: cc/layers/layer_impl.h

Issue 1680613002: Adding momentum/overscroll to views:: ScrollViews Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Tableview layout. aaaand I think we are done Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « cc/layers/layer.cc ('k') | cc/layers/layer_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 void SetBounds(const gfx::Size& bounds); 308 void SetBounds(const gfx::Size& bounds);
309 gfx::Size bounds() const; 309 gfx::Size bounds() const;
310 // Like bounds() but doesn't snap to int. Lossy on giant pages (e.g. millions 310 // Like bounds() but doesn't snap to int. Lossy on giant pages (e.g. millions
311 // of pixels) due to use of single precision float. 311 // of pixels) due to use of single precision float.
312 gfx::SizeF BoundsForScrolling() const; 312 gfx::SizeF BoundsForScrolling() const;
313 void SetBoundsDelta(const gfx::Vector2dF& bounds_delta); 313 void SetBoundsDelta(const gfx::Vector2dF& bounds_delta);
314 gfx::Vector2dF bounds_delta() const { return bounds_delta_; } 314 gfx::Vector2dF bounds_delta() const { return bounds_delta_; }
315 315
316 void SetCurrentScrollOffset(const gfx::ScrollOffset& scroll_offset); 316 void SetCurrentScrollOffset(const gfx::ScrollOffset& scroll_offset);
317 gfx::ScrollOffset CurrentScrollOffset() const; 317 gfx::ScrollOffset CurrentScrollOffset() const;
318 void SetCurrentOverscroll(const gfx::ScrollOffset& overscroll);
319 gfx::ScrollOffset CurrentOverscroll() const;
318 320
319 gfx::ScrollOffset MaxScrollOffset() const; 321 gfx::ScrollOffset MaxScrollOffset() const;
320 gfx::ScrollOffset ClampScrollOffsetToLimits(gfx::ScrollOffset offset) const; 322 gfx::ScrollOffset ClampScrollOffsetToLimits(gfx::ScrollOffset offset) const;
321 gfx::Vector2dF ClampScrollToMaxScrollOffset(); 323 gfx::Vector2dF ClampScrollToMaxScrollOffset();
322 324
323 // Returns the delta of the scroll that was outside of the bounds of the 325 // Returns the delta of the scroll that was outside of the bounds of the
324 // initial scroll 326 // initial scroll
325 gfx::Vector2dF ScrollBy(const gfx::Vector2dF& scroll); 327 gfx::Vector2dF ScrollBy(const gfx::Vector2dF& scroll);
326 328
327 void SetScrollClipLayer(int scroll_clip_layer_id); 329 // TODO(tapted): Remove this overload.
330 void SetScrollClipLayer(int scroll_clip_layer_id) {
331 SetScrollClipAndCanOverscroll(scroll_clip_layer_id, false);
332 }
333 void SetScrollClipAndCanOverscroll(int scroll_clip_layer_id,
334 bool can_overscroll);
328 int scroll_clip_layer_id() const { return scroll_clip_layer_id_; } 335 int scroll_clip_layer_id() const { return scroll_clip_layer_id_; }
329 LayerImpl* scroll_clip_layer() const; 336 LayerImpl* scroll_clip_layer() const;
330 bool scrollable() const; 337 bool scrollable() const;
338 bool can_overscroll() const { return can_overscroll_; }
331 339
332 void set_user_scrollable_horizontal(bool scrollable); 340 void set_user_scrollable_horizontal(bool scrollable);
333 bool user_scrollable_horizontal() const { 341 bool user_scrollable_horizontal() const {
334 return user_scrollable_horizontal_; 342 return user_scrollable_horizontal_;
335 } 343 }
336 void set_user_scrollable_vertical(bool scrollable); 344 void set_user_scrollable_vertical(bool scrollable);
337 bool user_scrollable_vertical() const { return user_scrollable_vertical_; } 345 bool user_scrollable_vertical() const { return user_scrollable_vertical_; }
338 346
339 bool user_scrollable(ScrollbarOrientation orientation) const; 347 bool user_scrollable(ScrollbarOrientation orientation) const;
340 348
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 519
512 // Properties synchronized from the associated Layer. 520 // Properties synchronized from the associated Layer.
513 gfx::Size bounds_; 521 gfx::Size bounds_;
514 int scroll_clip_layer_id_; 522 int scroll_clip_layer_id_;
515 523
516 gfx::Vector2dF offset_to_transform_parent_; 524 gfx::Vector2dF offset_to_transform_parent_;
517 uint32_t main_thread_scrolling_reasons_; 525 uint32_t main_thread_scrolling_reasons_;
518 526
519 bool user_scrollable_horizontal_ : 1; 527 bool user_scrollable_horizontal_ : 1;
520 bool user_scrollable_vertical_ : 1; 528 bool user_scrollable_vertical_ : 1;
529 bool can_overscroll_ : 1;
521 bool should_flatten_transform_from_property_tree_ : 1; 530 bool should_flatten_transform_from_property_tree_ : 1;
522 531
523 // Tracks if drawing-related properties have changed since last redraw. 532 // Tracks if drawing-related properties have changed since last redraw.
524 bool layer_property_changed_ : 1; 533 bool layer_property_changed_ : 1;
525 534
526 bool masks_to_bounds_ : 1; 535 bool masks_to_bounds_ : 1;
527 bool contents_opaque_ : 1; 536 bool contents_opaque_ : 1;
528 bool use_parent_backface_visibility_ : 1; 537 bool use_parent_backface_visibility_ : 1;
529 bool use_local_transform_for_backface_visibility_ : 1; 538 bool use_local_transform_for_backface_visibility_ : 1;
530 bool should_check_backface_visibility_ : 1; 539 bool should_check_backface_visibility_ : 1;
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
588 bool scrolls_drawn_descendant_ : 1; 597 bool scrolls_drawn_descendant_ : 1;
589 bool has_will_change_transform_hint_ : 1; 598 bool has_will_change_transform_hint_ : 1;
590 bool needs_push_properties_ : 1; 599 bool needs_push_properties_ : 1;
591 600
592 DISALLOW_COPY_AND_ASSIGN(LayerImpl); 601 DISALLOW_COPY_AND_ASSIGN(LayerImpl);
593 }; 602 };
594 603
595 } // namespace cc 604 } // namespace cc
596 605
597 #endif // CC_LAYERS_LAYER_IMPL_H_ 606 #endif // CC_LAYERS_LAYER_IMPL_H_
OLDNEW
« 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