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

Side by Side Diff: ui/compositor/overscroll/ui_input_handler.h

Issue 2194833002: Overscroll and Elasticity for views::ScrollView Base URL: https://chromium.googlesource.com/chromium/src.git@20160728-MacViews-RouteThroughInputHandler
Patch Set: Restore functionality and fix bugs \o/ Created 4 years, 1 month 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 | « ui/compositor/layer.cc ('k') | ui/compositor/overscroll/ui_input_handler.cc » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 UI_COMPOSITOR_OVERSCROLL_UI_INPUT_HANLDER_H_ 5 #ifndef UI_COMPOSITOR_OVERSCROLL_UI_INPUT_HANLDER_H_
6 #define UI_COMPOSITOR_OVERSCROLL_UI_INPUT_HANLDER_H_ 6 #define UI_COMPOSITOR_OVERSCROLL_UI_INPUT_HANLDER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "cc/input/input_handler.h" 10 #include "cc/input/input_handler.h"
11 #include "ui/events/blink/input_scroll_elasticity_controller.h"
11 12
12 namespace ui { 13 namespace ui {
13 14
14 class ScrollEvent; 15 class ScrollEvent;
15 16
16 // Class to feed UI-thread scroll events to a cc::InputHandler. Inspired by 17 // Class to feed UI-thread scroll events to a cc::InputHandler. Inspired by
17 // ui::InputHandlerProxy but greatly simplified. 18 // ui::InputHandlerProxy but greatly simplified.
18 class UIInputHandler : public cc::InputHandlerClient { 19 class UIInputHandler : public cc::InputHandlerClient {
19 public: 20 public:
20 explicit UIInputHandler(const base::WeakPtr<cc::InputHandler>& input_handler); 21 explicit UIInputHandler(const base::WeakPtr<cc::InputHandler>& input_handler);
(...skipping 13 matching lines...) Expand all
34 void UpdateRootLayerStateForSynchronousInputHandler( 35 void UpdateRootLayerStateForSynchronousInputHandler(
35 const gfx::ScrollOffset& total_scroll_offset, 36 const gfx::ScrollOffset& total_scroll_offset,
36 const gfx::ScrollOffset& max_scroll_offset, 37 const gfx::ScrollOffset& max_scroll_offset,
37 const gfx::SizeF& scrollable_size, 38 const gfx::SizeF& scrollable_size,
38 float page_scale_factor, 39 float page_scale_factor,
39 float min_page_scale_factor, 40 float min_page_scale_factor,
40 float max_page_scale_factor) override; 41 float max_page_scale_factor) override;
41 42
42 private: 43 private:
43 cc::InputHandler* input_handler_; // Weak. Cleared in WillShutdown(). 44 cc::InputHandler* input_handler_; // Weak. Cleared in WillShutdown().
45 InputScrollElasticityController scroll_elasticity_controller_;
44 46
45 DISALLOW_COPY_AND_ASSIGN(UIInputHandler); 47 DISALLOW_COPY_AND_ASSIGN(UIInputHandler);
46 }; 48 };
47 49
48 } // namespace ui 50 } // namespace ui
49 51
50 #endif // UI_COMPOSITOR_OVERSCROLL_UI_INPUT_HANLDER_H_ 52 #endif // UI_COMPOSITOR_OVERSCROLL_UI_INPUT_HANLDER_H_
OLDNEW
« no previous file with comments | « ui/compositor/layer.cc ('k') | ui/compositor/overscroll/ui_input_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698