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 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
367 void SetSentScrollDelta(gfx::Vector2d sent_scroll_delta); | 367 void SetSentScrollDelta(gfx::Vector2d sent_scroll_delta); |
368 gfx::Vector2d sent_scroll_delta() const { return sent_scroll_delta_; } | 368 gfx::Vector2d sent_scroll_delta() const { return sent_scroll_delta_; } |
369 | 369 |
370 // Returns the delta of the scroll that was outside of the bounds of the | 370 // Returns the delta of the scroll that was outside of the bounds of the |
371 // initial scroll | 371 // initial scroll |
372 gfx::Vector2dF ScrollBy(gfx::Vector2dF scroll); | 372 gfx::Vector2dF ScrollBy(gfx::Vector2dF scroll); |
373 | 373 |
374 void SetScrollable(bool scrollable) { scrollable_ = scrollable; } | 374 void SetScrollable(bool scrollable) { scrollable_ = scrollable; } |
375 bool scrollable() const { return scrollable_; } | 375 bool scrollable() const { return scrollable_; } |
376 | 376 |
| 377 void set_user_scrollable_horizontal(bool scrollable) { |
| 378 user_scrollable_horizontal_ = scrollable; |
| 379 } |
| 380 void set_user_scrollable_vertical(bool scrollable) { |
| 381 user_scrollable_vertical_ = scrollable; |
| 382 } |
| 383 |
377 void ApplySentScrollDeltasFromAbortedCommit(); | 384 void ApplySentScrollDeltasFromAbortedCommit(); |
378 void ApplyScrollDeltasSinceBeginFrame(); | 385 void ApplyScrollDeltasSinceBeginFrame(); |
379 | 386 |
380 void SetShouldScrollOnMainThread(bool should_scroll_on_main_thread) { | 387 void SetShouldScrollOnMainThread(bool should_scroll_on_main_thread) { |
381 should_scroll_on_main_thread_ = should_scroll_on_main_thread; | 388 should_scroll_on_main_thread_ = should_scroll_on_main_thread; |
382 } | 389 } |
383 bool should_scroll_on_main_thread() const { | 390 bool should_scroll_on_main_thread() const { |
384 return should_scroll_on_main_thread_; | 391 return should_scroll_on_main_thread_; |
385 } | 392 } |
386 | 393 |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
537 | 544 |
538 // Properties synchronized from the associated Layer. | 545 // Properties synchronized from the associated Layer. |
539 gfx::PointF anchor_point_; | 546 gfx::PointF anchor_point_; |
540 float anchor_point_z_; | 547 float anchor_point_z_; |
541 gfx::Size bounds_; | 548 gfx::Size bounds_; |
542 gfx::Vector2d scroll_offset_; | 549 gfx::Vector2d scroll_offset_; |
543 LayerScrollOffsetDelegate* scroll_offset_delegate_; | 550 LayerScrollOffsetDelegate* scroll_offset_delegate_; |
544 bool scrollable_; | 551 bool scrollable_; |
545 bool should_scroll_on_main_thread_; | 552 bool should_scroll_on_main_thread_; |
546 bool have_wheel_event_handlers_; | 553 bool have_wheel_event_handlers_; |
| 554 bool user_scrollable_horizontal_; |
| 555 bool user_scrollable_vertical_; |
547 Region non_fast_scrollable_region_; | 556 Region non_fast_scrollable_region_; |
548 Region touch_event_handler_region_; | 557 Region touch_event_handler_region_; |
549 SkColor background_color_; | 558 SkColor background_color_; |
550 bool stacking_order_changed_; | 559 bool stacking_order_changed_; |
551 | 560 |
552 // Whether the "back" of this layer should draw. | 561 // Whether the "back" of this layer should draw. |
553 bool double_sided_; | 562 bool double_sided_; |
554 | 563 |
555 // Tracks if drawing-related properties have changed since last redraw. | 564 // Tracks if drawing-related properties have changed since last redraw. |
556 bool layer_property_changed_; | 565 bool layer_property_changed_; |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
618 // Group of properties that need to be computed based on the layer tree | 627 // Group of properties that need to be computed based on the layer tree |
619 // hierarchy before layers can be drawn. | 628 // hierarchy before layers can be drawn. |
620 DrawProperties<LayerImpl> draw_properties_; | 629 DrawProperties<LayerImpl> draw_properties_; |
621 | 630 |
622 DISALLOW_COPY_AND_ASSIGN(LayerImpl); | 631 DISALLOW_COPY_AND_ASSIGN(LayerImpl); |
623 }; | 632 }; |
624 | 633 |
625 } // namespace cc | 634 } // namespace cc |
626 | 635 |
627 #endif // CC_LAYERS_LAYER_IMPL_H_ | 636 #endif // CC_LAYERS_LAYER_IMPL_H_ |
OLD | NEW |