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

Side by Side Diff: cc/trees/layer_tree_impl.h

Issue 2884423003: Use scroll-boundary-behavior to control overscroll-refresh/glow on android. (Closed)
Patch Set: Fixed the comments Created 3 years, 7 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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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_TREES_LAYER_TREE_IMPL_H_ 5 #ifndef CC_TREES_LAYER_TREE_IMPL_H_
6 #define CC_TREES_LAYER_TREE_IMPL_H_ 6 #define CC_TREES_LAYER_TREE_IMPL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
11 #include <unordered_map> 11 #include <unordered_map>
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/macros.h" 14 #include "base/macros.h"
15 #include "base/memory/ptr_util.h" 15 #include "base/memory/ptr_util.h"
16 #include "base/values.h" 16 #include "base/values.h"
17 #include "cc/base/synced_property.h" 17 #include "cc/base/synced_property.h"
18 #include "cc/input/event_listener_properties.h" 18 #include "cc/input/event_listener_properties.h"
19 #include "cc/input/layer_selection_bound.h" 19 #include "cc/input/layer_selection_bound.h"
20 #include "cc/input/scroll_boundary_behavior.h"
20 #include "cc/layers/layer_impl.h" 21 #include "cc/layers/layer_impl.h"
21 #include "cc/layers/layer_list_iterator.h" 22 #include "cc/layers/layer_list_iterator.h"
22 #include "cc/output/begin_frame_args.h" 23 #include "cc/output/begin_frame_args.h"
23 #include "cc/output/swap_promise.h" 24 #include "cc/output/swap_promise.h"
24 #include "cc/resources/ui_resource_client.h" 25 #include "cc/resources/ui_resource_client.h"
25 #include "cc/trees/layer_tree_host_impl.h" 26 #include "cc/trees/layer_tree_host_impl.h"
26 #include "cc/trees/property_tree.h" 27 #include "cc/trees/property_tree.h"
27 28
28 namespace base { 29 namespace base {
29 namespace trace_event { 30 namespace trace_event {
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 bool SetCurrentBrowserControlsShownRatio(float ratio); 426 bool SetCurrentBrowserControlsShownRatio(float ratio);
426 float CurrentBrowserControlsShownRatio() const { 427 float CurrentBrowserControlsShownRatio() const {
427 return top_controls_shown_ratio_->Current(IsActiveTree()); 428 return top_controls_shown_ratio_->Current(IsActiveTree());
428 } 429 }
429 void set_top_controls_height(float top_controls_height); 430 void set_top_controls_height(float top_controls_height);
430 float top_controls_height() const { return top_controls_height_; } 431 float top_controls_height() const { return top_controls_height_; }
431 void PushBrowserControlsFromMainThread(float top_controls_shown_ratio); 432 void PushBrowserControlsFromMainThread(float top_controls_shown_ratio);
432 void set_bottom_controls_height(float bottom_controls_height); 433 void set_bottom_controls_height(float bottom_controls_height);
433 float bottom_controls_height() const { return bottom_controls_height_; } 434 float bottom_controls_height() const { return bottom_controls_height_; }
434 435
436 void set_scroll_boundary_behavior(ScrollBoundaryBehavior behavior);
437 ScrollBoundaryBehavior scroll_boundary_behavior() const {
438 return scroll_boundary_behavior_;
439 }
440
435 void SetPendingPageScaleAnimation( 441 void SetPendingPageScaleAnimation(
436 std::unique_ptr<PendingPageScaleAnimation> pending_animation); 442 std::unique_ptr<PendingPageScaleAnimation> pending_animation);
437 std::unique_ptr<PendingPageScaleAnimation> TakePendingPageScaleAnimation(); 443 std::unique_ptr<PendingPageScaleAnimation> TakePendingPageScaleAnimation();
438 444
439 void DidUpdateScrollOffset(int layer_id); 445 void DidUpdateScrollOffset(int layer_id);
440 void DidUpdateScrollState(int layer_id); 446 void DidUpdateScrollState(int layer_id);
441 447
442 bool have_scroll_event_handlers() const { 448 bool have_scroll_event_handlers() const {
443 return have_scroll_event_handlers_; 449 return have_scroll_event_handlers_;
444 } 450 }
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
568 bool have_scroll_event_handlers_; 574 bool have_scroll_event_handlers_;
569 EventListenerProperties event_listener_properties_[static_cast<size_t>( 575 EventListenerProperties event_listener_properties_[static_cast<size_t>(
570 EventListenerClass::kNumClasses)]; 576 EventListenerClass::kNumClasses)];
571 577
572 // Whether or not Blink's viewport size was shrunk by the height of the top 578 // Whether or not Blink's viewport size was shrunk by the height of the top
573 // controls at the time of the last layout. 579 // controls at the time of the last layout.
574 bool browser_controls_shrink_blink_size_; 580 bool browser_controls_shrink_blink_size_;
575 float top_controls_height_; 581 float top_controls_height_;
576 float bottom_controls_height_; 582 float bottom_controls_height_;
577 583
584 ScrollBoundaryBehavior scroll_boundary_behavior_;
585
578 // The amount that the browser controls are shown from 0 (hidden) to 1 (fully 586 // The amount that the browser controls are shown from 0 (hidden) to 1 (fully
579 // shown). 587 // shown).
580 scoped_refptr<SyncedBrowserControls> top_controls_shown_ratio_; 588 scoped_refptr<SyncedBrowserControls> top_controls_shown_ratio_;
581 589
582 std::unique_ptr<PendingPageScaleAnimation> pending_page_scale_animation_; 590 std::unique_ptr<PendingPageScaleAnimation> pending_page_scale_animation_;
583 591
584 private: 592 private:
585 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); 593 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl);
586 }; 594 };
587 595
588 } // namespace cc 596 } // namespace cc
589 597
590 #endif // CC_TREES_LAYER_TREE_IMPL_H_ 598 #endif // CC_TREES_LAYER_TREE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698