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

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

Issue 1063853005: Unify Android Webview and Chrome's fling (Closed) Base URL: https://chromium.googlesource.com/a/chromium/src.git@master
Patch Set: add proguard Created 5 years, 6 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
« no previous file with comments | « cc/input/input_handler.h ('k') | cc/layers/layer_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
10 #include "base/time/time.h"
9 #include "ui/gfx/geometry/scroll_offset.h" 11 #include "ui/gfx/geometry/scroll_offset.h"
10 #include "ui/gfx/geometry/size_f.h" 12 #include "ui/gfx/geometry/size_f.h"
11 13
12 namespace cc { 14 namespace cc {
13 15
14 // The LayerScrollOffsetDelegate allows for the embedder to take ownership of 16 // The LayerScrollOffsetDelegate allows for the embedder to take ownership of
15 // the scroll offset of the root layer. 17 // the scroll offset of the root layer.
16 // 18 //
17 // The LayerScrollOffsetDelegate is only used on the impl thread. 19 // The LayerScrollOffsetDelegate is only used on the impl thread.
18 class LayerScrollOffsetDelegate { 20 class LayerScrollOffsetDelegate {
(...skipping 18 matching lines...) Expand all
37 virtual void UpdateRootLayerState( 39 virtual void UpdateRootLayerState(
38 const gfx::ScrollOffset& total_scroll_offset, 40 const gfx::ScrollOffset& total_scroll_offset,
39 const gfx::ScrollOffset& max_scroll_offset, 41 const gfx::ScrollOffset& max_scroll_offset,
40 const gfx::SizeF& scrollable_size, 42 const gfx::SizeF& scrollable_size,
41 float page_scale_factor, 43 float page_scale_factor,
42 float min_page_scale_factor, 44 float min_page_scale_factor,
43 float max_page_scale_factor) = 0; 45 float max_page_scale_factor) = 0;
44 46
45 // This is called by the compositor to check whether a delegate-managed fling 47 // This is called by the compositor to check whether a delegate-managed fling
46 // is active or not. 48 // is active or not.
47 virtual bool IsExternalFlingActive() const = 0; 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
54 // requires a scheduled animation update.
55 typedef base::Callback<void(base::TimeTicks)> AnimationCallback;
56 virtual void SetNeedsAnimate(const AnimationCallback& animation) = 0;
48 57
49 protected: 58 protected:
50 LayerScrollOffsetDelegate() {} 59 LayerScrollOffsetDelegate() {}
51 virtual ~LayerScrollOffsetDelegate() {} 60 virtual ~LayerScrollOffsetDelegate() {}
52 61
53 private: 62 private:
54 DISALLOW_COPY_AND_ASSIGN(LayerScrollOffsetDelegate); 63 DISALLOW_COPY_AND_ASSIGN(LayerScrollOffsetDelegate);
55 }; 64 };
56 65
57 } // namespace cc 66 } // namespace cc
58 67
59 #endif // CC_INPUT_LAYER_SCROLL_OFFSET_DELEGATE_H_ 68 #endif // CC_INPUT_LAYER_SCROLL_OFFSET_DELEGATE_H_
OLDNEW
« no previous file with comments | « cc/input/input_handler.h ('k') | cc/layers/layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698