| Index: ui/touch_selection/touch_selection_controller_android.h
|
| diff --git a/ui/touch_selection/touch_selection_controller_android.h b/ui/touch_selection/touch_selection_controller_android.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..b53143e5dbebb63d0694830581bafa701254d84f
|
| --- /dev/null
|
| +++ b/ui/touch_selection/touch_selection_controller_android.h
|
| @@ -0,0 +1,52 @@
|
| +// Copyright 2015 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_TOUCH_SELECTION_TOUCH_SELECTION_CONTROLLER_ANDROID_H_
|
| +#define UI_TOUCH_SELECTION_TOUCH_SELECTION_CONTROLLER_ANDROID_H_
|
| +
|
| +#include "ui/gfx/geometry/point_f.h"
|
| +#include "ui/touch_selection/selection_event_type.h"
|
| +#include "ui/touch_selection/touch_selection_controller.h"
|
| +
|
| +namespace ui {
|
| +
|
| +// Interface through which |TouchSelectionControllerAndroid| issues
|
| +// selection-related commands, notifications and requests.
|
| +class UI_TOUCH_SELECTION_EXPORT TouchSelectionControllerAndroidClient
|
| + : public TouchSelectionControllerClient {
|
| + public:
|
| + ~TouchSelectionControllerAndroidClient() override {}
|
| +
|
| + virtual bool SupportsAnimation() const = 0;
|
| + virtual void SetNeedsAnimate() = 0;
|
| + virtual void OnSelectionEvent(SelectionEventType event,
|
| + const gfx::PointF& position) = 0;
|
| + virtual scoped_ptr<TouchHandleDrawable> CreateDrawable() = 0;
|
| +};
|
| +
|
| +// Android implementation of |TouchSelectionController|.
|
| +class UI_TOUCH_SELECTION_EXPORT TouchSelectionControllerAndroid
|
| + : public TouchSelectionController {
|
| + public:
|
| + TouchSelectionControllerAndroid(TouchSelectionControllerAndroidClient* client,
|
| + base::TimeDelta tap_timeout,
|
| + float tap_slop);
|
| + ~TouchSelectionControllerAndroid() override;
|
| +
|
| + private:
|
| + // TouchSelectionController:
|
| + void OnSelectionEvent(SelectionEventType event,
|
| + const gfx::PointF& position) override;
|
| + bool SupportsAnimation() const override;
|
| + void SetNeedsAnimate() override;
|
| + scoped_ptr<TouchHandleDrawable> CreateDrawable() override;
|
| +
|
| + TouchSelectionControllerAndroidClient* const client_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(TouchSelectionControllerAndroid);
|
| +};
|
| +
|
| +} // namespace ui
|
| +
|
| +#endif // UI_TOUCH_SELECTION_TOUCH_SELECTION_CONTROLLER_ANDROID_H_
|
|
|