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

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

Issue 2197503002: Route Scroll events through a cc::InputHandler Base URL: https://chromium.googlesource.com/chromium/src.git@20160728-MacViews-ScrollWheelAsScrollEvent
Patch Set: Abandon DeliverInputForBeginFrame: will not help fix the header row Created 4 years 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef UI_COMPOSITOR_OVERSCROLL_UI_SCROLL_INPUT_MANAGER_H_
6 #define UI_COMPOSITOR_OVERSCROLL_UI_SCROLL_INPUT_MANAGER_H_
7
8 #include <memory>
9
10 #include "base/macros.h"
11 #include "base/memory/weak_ptr.h"
12 #include "cc/trees/element_id.h"
13 #include "ui/compositor/compositor_export.h"
14
15 namespace cc {
16 class InputHandler;
17 }
18
19 namespace ui {
20
21 class Layer;
22 class ScrollEvent;
23 class UIInputHandler;
24
25 // UI-Thread helper for directing scroll events to the Compositor to enable
26 // accelerated scrolling, and elastic scrolling on Mac.
27 class COMPOSITOR_EXPORT UIScrollInputManager {
28 public:
29 explicit UIScrollInputManager(
30 const base::WeakPtr<cc::InputHandler>& input_handler);
31 ~UIScrollInputManager();
32
33 // Scroll the given |layer_to_scroll| according to |event|.
34 bool OnScrollEvent(const ScrollEvent& event, Layer* layer_to_scroll);
35
36 private:
37 std::unique_ptr<UIInputHandler> input_wrapper_;
38
39 DISALLOW_COPY_AND_ASSIGN(UIScrollInputManager);
40 };
41
42 } // namespace ui
43
44 #endif // UI_COMPOSITOR_OVERSCROLL_UI_SCROLL_INPUT_MANAGER_H_
OLDNEW
« no previous file with comments | « ui/compositor/overscroll/ui_input_handler.cc ('k') | ui/compositor/overscroll/ui_scroll_input_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698