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

Unified Diff: ui/compositor/overscroll/ui_scroll_input_manager.h

Issue 1680613002: Adding momentum/overscroll to views:: ScrollViews Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Tableview layout. aaaand I think we are done Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« 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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/overscroll/ui_scroll_input_manager.h
diff --git a/ui/compositor/overscroll/ui_scroll_input_manager.h b/ui/compositor/overscroll/ui_scroll_input_manager.h
new file mode 100644
index 0000000000000000000000000000000000000000..287279465794a78b0ed295b3fb44ff02412ec098
--- /dev/null
+++ b/ui/compositor/overscroll/ui_scroll_input_manager.h
@@ -0,0 +1,43 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_COMPOSITOR_OVERSCROLL_UI_SCROLL_INPUT_MANAGER_H_
+#define UI_COMPOSITOR_OVERSCROLL_UI_SCROLL_INPUT_MANAGER_H_
+
+#include <memory>
+
+#include "base/macros.h"
+#include "base/memory/weak_ptr.h"
+#include "ui/compositor/compositor_export.h"
+
+namespace cc {
+class InputHandler;
+}
+
+namespace ui {
+
+class ScrollEvent;
+class UIInputHandler;
+
+// UI-Thread helper for directing scroll events to the Compositor to enable
+// accelerated scrolling, and elastic scrolling on Mac.
+class COMPOSITOR_EXPORT UIScrollInputManager {
+ public:
+ explicit UIScrollInputManager(
+ const base::WeakPtr<cc::InputHandler>& input_handler);
+ ~UIScrollInputManager();
+
+ void OnScrollEvent(const ScrollEvent& event);
+
+ private:
+ std::unique_ptr<UIInputHandler> input_wrapper_;
+
+ bool scrolling_ = false;
+
+ DISALLOW_COPY_AND_ASSIGN(UIScrollInputManager);
+};
+
+} // namespace ui
+
+#endif // UI_COMPOSITOR_OVERSCROLL_UI_SCROLL_INPUT_MANAGER_H_
« 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