OLD | NEW |
---|---|
1 // Copyright 2010 The Chromium Authors. All rights reserved. | 1 // Copyright 2010 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_H_ | 5 #ifndef CC_LAYERS_LAYER_H_ |
6 #define CC_LAYERS_LAYER_H_ | 6 #define CC_LAYERS_LAYER_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
244 void SetScrollOffset(gfx::Vector2d scroll_offset); | 244 void SetScrollOffset(gfx::Vector2d scroll_offset); |
245 gfx::Vector2d scroll_offset() const { return scroll_offset_; } | 245 gfx::Vector2d scroll_offset() const { return scroll_offset_; } |
246 void SetScrollOffsetFromImplSide(gfx::Vector2d scroll_offset); | 246 void SetScrollOffsetFromImplSide(gfx::Vector2d scroll_offset); |
247 | 247 |
248 void SetMaxScrollOffset(gfx::Vector2d max_scroll_offset); | 248 void SetMaxScrollOffset(gfx::Vector2d max_scroll_offset); |
249 gfx::Vector2d max_scroll_offset() const { return max_scroll_offset_; } | 249 gfx::Vector2d max_scroll_offset() const { return max_scroll_offset_; } |
250 | 250 |
251 void SetScrollable(bool scrollable); | 251 void SetScrollable(bool scrollable); |
252 bool scrollable() const { return scrollable_; } | 252 bool scrollable() const { return scrollable_; } |
253 | 253 |
254 void SetUserScrollable(bool horizontal, bool vertical) { | |
255 user_scrollable_horizontal_ = horizontal; | |
256 user_scrollable_vertical_ = vertical; | |
danakj
2013/10/21 22:34:41
This doesn't need to SetNeedsCommit()?
sadrul
2013/10/21 23:11:17
It probably does! Done.
danakj
2013/10/21 23:30:09
Ok, can you add it to layer_unittest.cc then?
sadrul
2013/10/21 23:33:22
Done.
| |
257 } | |
258 bool user_scrollable_horizontal() const { | |
259 return user_scrollable_horizontal_; | |
260 } | |
261 bool user_scrollable_vertical() const { return user_scrollable_vertical_; } | |
262 | |
254 void SetShouldScrollOnMainThread(bool should_scroll_on_main_thread); | 263 void SetShouldScrollOnMainThread(bool should_scroll_on_main_thread); |
255 bool should_scroll_on_main_thread() const { | 264 bool should_scroll_on_main_thread() const { |
256 return should_scroll_on_main_thread_; | 265 return should_scroll_on_main_thread_; |
257 } | 266 } |
258 | 267 |
259 void SetHaveWheelEventHandlers(bool have_wheel_event_handlers); | 268 void SetHaveWheelEventHandlers(bool have_wheel_event_handlers); |
260 bool have_wheel_event_handlers() const { return have_wheel_event_handlers_; } | 269 bool have_wheel_event_handlers() const { return have_wheel_event_handlers_; } |
261 | 270 |
262 void SetNonFastScrollableRegion(const Region& non_fast_scrollable_region); | 271 void SetNonFastScrollableRegion(const Region& non_fast_scrollable_region); |
263 const Region& non_fast_scrollable_region() const { | 272 const Region& non_fast_scrollable_region() const { |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
532 scoped_refptr<LayerAnimationController> layer_animation_controller_; | 541 scoped_refptr<LayerAnimationController> layer_animation_controller_; |
533 | 542 |
534 // Layer properties. | 543 // Layer properties. |
535 gfx::Size bounds_; | 544 gfx::Size bounds_; |
536 | 545 |
537 gfx::Vector2d scroll_offset_; | 546 gfx::Vector2d scroll_offset_; |
538 gfx::Vector2d max_scroll_offset_; | 547 gfx::Vector2d max_scroll_offset_; |
539 bool scrollable_; | 548 bool scrollable_; |
540 bool should_scroll_on_main_thread_; | 549 bool should_scroll_on_main_thread_; |
541 bool have_wheel_event_handlers_; | 550 bool have_wheel_event_handlers_; |
551 bool user_scrollable_horizontal_; | |
552 bool user_scrollable_vertical_; | |
542 Region non_fast_scrollable_region_; | 553 Region non_fast_scrollable_region_; |
543 Region touch_event_handler_region_; | 554 Region touch_event_handler_region_; |
544 gfx::PointF position_; | 555 gfx::PointF position_; |
545 gfx::PointF anchor_point_; | 556 gfx::PointF anchor_point_; |
546 SkColor background_color_; | 557 SkColor background_color_; |
547 CompositingReasons compositing_reasons_; | 558 CompositingReasons compositing_reasons_; |
548 float opacity_; | 559 float opacity_; |
549 FilterOperations filters_; | 560 FilterOperations filters_; |
550 FilterOperations background_filters_; | 561 FilterOperations background_filters_; |
551 float anchor_point_z_; | 562 float anchor_point_z_; |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
584 DrawProperties<Layer> draw_properties_; | 595 DrawProperties<Layer> draw_properties_; |
585 | 596 |
586 PaintProperties paint_properties_; | 597 PaintProperties paint_properties_; |
587 | 598 |
588 DISALLOW_COPY_AND_ASSIGN(Layer); | 599 DISALLOW_COPY_AND_ASSIGN(Layer); |
589 }; | 600 }; |
590 | 601 |
591 } // namespace cc | 602 } // namespace cc |
592 | 603 |
593 #endif // CC_LAYERS_LAYER_H_ | 604 #endif // CC_LAYERS_LAYER_H_ |
OLD | NEW |