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 <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
11 #include <map> | 11 #include <map> |
12 #include <memory> | 12 #include <memory> |
13 #include <set> | 13 #include <set> |
14 #include <string> | 14 #include <string> |
15 #include <vector> | 15 #include <vector> |
16 | 16 |
17 #include "base/logging.h" | 17 #include "base/logging.h" |
18 #include "base/macros.h" | 18 #include "base/macros.h" |
19 #include "base/memory/ptr_util.h" | 19 #include "base/memory/ptr_util.h" |
20 #include "base/values.h" | 20 #include "base/values.h" |
21 #include "cc/base/region.h" | 21 #include "cc/base/region.h" |
22 #include "cc/base/synced_property.h" | 22 #include "cc/base/synced_property.h" |
23 #include "cc/cc_export.h" | 23 #include "cc/cc_export.h" |
24 #include "cc/input/input_handler.h" | 24 #include "cc/input/input_handler.h" |
| 25 #include "cc/input/scroll_boundary_behavior.h" |
25 #include "cc/layers/draw_properties.h" | 26 #include "cc/layers/draw_properties.h" |
26 #include "cc/layers/layer_collections.h" | 27 #include "cc/layers/layer_collections.h" |
27 #include "cc/layers/layer_impl_test_properties.h" | 28 #include "cc/layers/layer_impl_test_properties.h" |
28 #include "cc/layers/layer_position_constraint.h" | 29 #include "cc/layers/layer_position_constraint.h" |
29 #include "cc/layers/performance_properties.h" | 30 #include "cc/layers/performance_properties.h" |
30 #include "cc/layers/render_surface_impl.h" | 31 #include "cc/layers/render_surface_impl.h" |
31 #include "cc/quads/shared_quad_state.h" | 32 #include "cc/quads/shared_quad_state.h" |
32 #include "cc/resources/resource_provider.h" | 33 #include "cc/resources/resource_provider.h" |
33 #include "cc/tiles/tile_priority.h" | 34 #include "cc/tiles/tile_priority.h" |
34 #include "cc/trees/element_id.h" | 35 #include "cc/trees/element_id.h" |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 void SetBoundsDelta(const gfx::Vector2dF& bounds_delta); | 283 void SetBoundsDelta(const gfx::Vector2dF& bounds_delta); |
283 gfx::Vector2dF bounds_delta() const { return bounds_delta_; } | 284 gfx::Vector2dF bounds_delta() const { return bounds_delta_; } |
284 | 285 |
285 void SetCurrentScrollOffset(const gfx::ScrollOffset& scroll_offset); | 286 void SetCurrentScrollOffset(const gfx::ScrollOffset& scroll_offset); |
286 gfx::ScrollOffset CurrentScrollOffset() const; | 287 gfx::ScrollOffset CurrentScrollOffset() const; |
287 | 288 |
288 gfx::ScrollOffset MaxScrollOffset() const; | 289 gfx::ScrollOffset MaxScrollOffset() const; |
289 gfx::ScrollOffset ClampScrollOffsetToLimits(gfx::ScrollOffset offset) const; | 290 gfx::ScrollOffset ClampScrollOffsetToLimits(gfx::ScrollOffset offset) const; |
290 gfx::Vector2dF ClampScrollToMaxScrollOffset(); | 291 gfx::Vector2dF ClampScrollToMaxScrollOffset(); |
291 | 292 |
| 293 void SetScrollBoundaryBehavior(ScrollBoundaryBehavior); |
| 294 ScrollBoundaryBehavior scrollBoundaryBehavior() { |
| 295 return scroll_boundary_behavior_; |
| 296 } |
| 297 |
292 // Returns the delta of the scroll that was outside of the bounds of the | 298 // Returns the delta of the scroll that was outside of the bounds of the |
293 // initial scroll | 299 // initial scroll |
294 gfx::Vector2dF ScrollBy(const gfx::Vector2dF& scroll); | 300 gfx::Vector2dF ScrollBy(const gfx::Vector2dF& scroll); |
295 | 301 |
296 void SetScrollClipLayer(int scroll_clip_layer_id); | 302 void SetScrollClipLayer(int scroll_clip_layer_id); |
297 int scroll_clip_layer_id() const { return scroll_clip_layer_id_; } | 303 int scroll_clip_layer_id() const { return scroll_clip_layer_id_; } |
298 LayerImpl* scroll_clip_layer() const; | 304 LayerImpl* scroll_clip_layer() const; |
299 bool scrollable() const; | 305 bool scrollable() const; |
300 | 306 |
301 void set_user_scrollable_horizontal(bool scrollable); | 307 void set_user_scrollable_horizontal(bool scrollable); |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
552 PerformanceProperties<LayerImpl> performance_properties_; | 558 PerformanceProperties<LayerImpl> performance_properties_; |
553 | 559 |
554 std::unique_ptr<base::trace_event::ConvertableToTraceFormat> | 560 std::unique_ptr<base::trace_event::ConvertableToTraceFormat> |
555 owned_debug_info_; | 561 owned_debug_info_; |
556 base::trace_event::ConvertableToTraceFormat* debug_info_; | 562 base::trace_event::ConvertableToTraceFormat* debug_info_; |
557 | 563 |
558 bool has_will_change_transform_hint_ : 1; | 564 bool has_will_change_transform_hint_ : 1; |
559 bool needs_push_properties_ : 1; | 565 bool needs_push_properties_ : 1; |
560 bool scrollbars_hidden_ : 1; | 566 bool scrollbars_hidden_ : 1; |
561 | 567 |
| 568 ScrollBoundaryBehavior scroll_boundary_behavior_; |
| 569 |
562 DISALLOW_COPY_AND_ASSIGN(LayerImpl); | 570 DISALLOW_COPY_AND_ASSIGN(LayerImpl); |
563 }; | 571 }; |
564 | 572 |
565 } // namespace cc | 573 } // namespace cc |
566 | 574 |
567 #endif // CC_LAYERS_LAYER_IMPL_H_ | 575 #endif // CC_LAYERS_LAYER_IMPL_H_ |
OLD | NEW |