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

Unified Diff: athena/util/drag_handle.h

Issue 545393002: Adding split view divider widget. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing a NOTREACHED in the test Created 6 years, 3 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 | « athena/util/DEPS ('k') | athena/util/drag_handle.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: athena/util/drag_handle.h
diff --git a/athena/util/drag_handle.h b/athena/util/drag_handle.h
new file mode 100644
index 0000000000000000000000000000000000000000..ad1b20914c587ef67491a32607fe8380ffe9019c
--- /dev/null
+++ b/athena/util/drag_handle.h
@@ -0,0 +1,41 @@
+// Copyright 2014 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 ATHENA_UTIL_DRAG_HANDLE_H_
+#define ATHENA_UTIL_DRAG_HANDLE_H_
+
+#include "athena/athena_export.h"
+
+namespace views {
+class View;
+}
+
+namespace athena {
+class DragHandleScrollDelegate {
+ public:
+ virtual ~DragHandleScrollDelegate() {}
+
+ // Beginning of a scroll gesture.
+ virtual void HandleScrollBegin(float delta) = 0;
+
+ // End of the current scroll gesture.
+ virtual void HandleScrollEnd() = 0;
+
+ // Update of the scroll position for the currently active scroll gesture.
+ virtual void HandleScrollUpdate(float delta) = 0;
+};
+
+enum DragHandleScrollDirection { DRAG_HANDLE_VERTICAL, DRAG_HANDLE_HORIZONTAL };
+
+// Creates a handle view which notifies the delegate of the scrolls performed on
+// it.
+ATHENA_EXPORT views::View* CreateDragHandleView(
+ DragHandleScrollDirection scroll_direction,
+ DragHandleScrollDelegate* delegate,
+ int preferred_width,
+ int preferred_height);
+
+} // namespace athena
+
+#endif // ATHENA_UTIL_DRAG_HANDLE_H_
« no previous file with comments | « athena/util/DEPS ('k') | athena/util/drag_handle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698