| OLD | NEW |
| (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 "ui/compositor/compositor_export.h" |
| 13 |
| 14 namespace cc { |
| 15 class InputHandler; |
| 16 } |
| 17 |
| 18 namespace ui { |
| 19 |
| 20 class ScrollEvent; |
| 21 class UIInputHandler; |
| 22 |
| 23 // UI-Thread helper for directing scroll events to the Compositor to enable |
| 24 // accelerated scrolling, and elastic scrolling on Mac. |
| 25 class COMPOSITOR_EXPORT UIScrollInputManager { |
| 26 public: |
| 27 explicit UIScrollInputManager( |
| 28 const base::WeakPtr<cc::InputHandler>& input_handler); |
| 29 ~UIScrollInputManager(); |
| 30 |
| 31 void OnScrollEvent(const ScrollEvent& event); |
| 32 |
| 33 private: |
| 34 std::unique_ptr<UIInputHandler> input_wrapper_; |
| 35 |
| 36 bool scrolling_ = false; |
| 37 |
| 38 DISALLOW_COPY_AND_ASSIGN(UIScrollInputManager); |
| 39 }; |
| 40 |
| 41 } // namespace ui |
| 42 |
| 43 #endif // UI_COMPOSITOR_OVERSCROLL_UI_SCROLL_INPUT_MANAGER_H_ |
| OLD | NEW |