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

Side by Side Diff: ui/touch_selection/touch_selection_controller_android.h

Issue 1046783002: wip: Aura-specific implementation of unified touch selection: touch_selection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Refactoring - common client for Aura and Android. Created 5 years, 8 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 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_TOUCH_SELECTION_TOUCH_SELECTION_CONTROLLER_ANDROID_H_
6 #define UI_TOUCH_SELECTION_TOUCH_SELECTION_CONTROLLER_ANDROID_H_
7
8 #include "ui/gfx/geometry/point_f.h"
9 #include "ui/touch_selection/selection_event_type.h"
10 #include "ui/touch_selection/touch_selection_controller.h"
11
12 namespace ui {
13
14 // Interface through which |TouchSelectionControllerAndroid| issues
15 // selection-related commands, notifications and requests.
16 class UI_TOUCH_SELECTION_EXPORT TouchSelectionControllerAndroidClient
17 : public TouchSelectionControllerClient {
18 public:
19 ~TouchSelectionControllerAndroidClient() override {}
20
21 virtual bool SupportsAnimation() const = 0;
22 virtual void SetNeedsAnimate() = 0;
23 virtual void OnSelectionEvent(SelectionEventType event,
24 const gfx::PointF& position) = 0;
25 virtual scoped_ptr<TouchHandleDrawable> CreateDrawable() = 0;
26 };
27
28 // Android implementation of |TouchSelectionController|.
29 class UI_TOUCH_SELECTION_EXPORT TouchSelectionControllerAndroid
30 : public TouchSelectionController {
jdduke (slow) 2015/03/30 15:46:22 Aren't we inheriting from TouchSelectionController
31 public:
32 TouchSelectionControllerAndroid(TouchSelectionControllerAndroidClient* client,
33 base::TimeDelta tap_timeout,
34 float tap_slop);
35 ~TouchSelectionControllerAndroid() override;
36
37 private:
38 // TouchSelectionController:
39 void OnSelectionEvent(SelectionEventType event,
40 const gfx::PointF& position) override;
41 bool SupportsAnimation() const override;
42 void SetNeedsAnimate() override;
43 scoped_ptr<TouchHandleDrawable> CreateDrawable() override;
44
45 TouchSelectionControllerAndroidClient* const client_;
46
47 DISALLOW_COPY_AND_ASSIGN(TouchSelectionControllerAndroid);
48 };
49
50 } // namespace ui
51
52 #endif // UI_TOUCH_SELECTION_TOUCH_SELECTION_CONTROLLER_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698