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

Side by Side Diff: cc/input/layer_scroll_offset_delegate.h

Issue 1251323002: Plumb smooth scrolling in Chromium compositor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use a blink page scale animation Created 5 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_INPUT_LAYER_SCROLL_OFFSET_DELEGATE_H_ 5 #ifndef CC_INPUT_LAYER_SCROLL_OFFSET_DELEGATE_H_
6 #define CC_INPUT_LAYER_SCROLL_OFFSET_DELEGATE_H_ 6 #define CC_INPUT_LAYER_SCROLL_OFFSET_DELEGATE_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/callback_forward.h" 9 #include "base/callback_forward.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 26 matching lines...) Expand all
37 // |min_page_scale_factor| page scale lower limit, 37 // |min_page_scale_factor| page scale lower limit,
38 // |max_page_scale_factor| page scale upper limit. 38 // |max_page_scale_factor| page scale upper limit.
39 virtual void UpdateRootLayerState( 39 virtual void UpdateRootLayerState(
40 const gfx::ScrollOffset& total_scroll_offset, 40 const gfx::ScrollOffset& total_scroll_offset,
41 const gfx::ScrollOffset& max_scroll_offset, 41 const gfx::ScrollOffset& max_scroll_offset,
42 const gfx::SizeF& scrollable_size, 42 const gfx::SizeF& scrollable_size,
43 float page_scale_factor, 43 float page_scale_factor,
44 float min_page_scale_factor, 44 float min_page_scale_factor,
45 float max_page_scale_factor) = 0; 45 float max_page_scale_factor) = 0;
46 46
47 // This is called by the compositor to check whether a delegate-managed fling
48 // is active or not.
49 // TODO(hush): Remove after WebView's smooth scrolling path is unified with
50 // Chrome's.
51 virtual bool IsExternalScrollActive() const = 0;
52
53 // This is called by the compositor when a fling hitting the root layer 47 // This is called by the compositor when a fling hitting the root layer
54 // requires a scheduled animation update. 48 // requires a scheduled animation update.
55 typedef base::Callback<void(base::TimeTicks)> AnimationCallback; 49 typedef base::Callback<void(base::TimeTicks)> AnimationCallback;
56 virtual void SetNeedsAnimate(const AnimationCallback& animation) = 0; 50 virtual void SetNeedsAnimate(const AnimationCallback& animation) = 0;
57 51
58 protected: 52 protected:
59 LayerScrollOffsetDelegate() {} 53 LayerScrollOffsetDelegate() {}
60 virtual ~LayerScrollOffsetDelegate() {} 54 virtual ~LayerScrollOffsetDelegate() {}
61 55
62 private: 56 private:
63 DISALLOW_COPY_AND_ASSIGN(LayerScrollOffsetDelegate); 57 DISALLOW_COPY_AND_ASSIGN(LayerScrollOffsetDelegate);
64 }; 58 };
65 59
66 } // namespace cc 60 } // namespace cc
67 61
68 #endif // CC_INPUT_LAYER_SCROLL_OFFSET_DELEGATE_H_ 62 #endif // CC_INPUT_LAYER_SCROLL_OFFSET_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698