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.
5 #ifndef UI_TOUCH_SELECTION_TOUCH_HANDLE_DRAWABLE_AURA_H_
6 #define UI_TOUCH_SELECTION_TOUCH_HANDLE_DRAWABLE_AURA_H_
8 #include "ui/touch_selection/touch_handle.h"
9 #include "ui/touch_selection/touch_handle_orientation.h"
10 #include "ui/touch_selection/ui_touch_selection_export.h"
16 namespace aura_extra
{
17 class ImageWindowDelegate
;
22 class UI_TOUCH_SELECTION_EXPORT TouchHandleDrawableAura
23 : public TouchHandleDrawable
{
25 explicit TouchHandleDrawableAura(aura::Window
* parent
);
26 ~TouchHandleDrawableAura() override
;
31 bool IsVisible() const;
33 // TouchHandleDrawable:
34 void SetEnabled(bool enabled
) override
;
35 void SetOrientation(TouchHandleOrientation orientation
) override
;
36 void SetAlpha(float alpha
) override
;
37 void SetFocus(const gfx::PointF
& position
) override
;
38 gfx::RectF
GetVisibleBounds() const override
;
40 aura_extra::ImageWindowDelegate
* window_delegate_
;
41 scoped_ptr
<aura::Window
> window_
;
44 ui::TouchHandleOrientation orientation_
;
46 // Focal position of the handle set via SetFocus (normally located on the
47 // intersection of the cursor line and the text base line), in coordinate
48 // space of selection controller client (i.e. handle's parent).
49 gfx::PointF focal_position_
;
51 // Window bounds relative to the focal position.
52 gfx::RectF relative_bounds_
;
54 DISALLOW_COPY_AND_ASSIGN(TouchHandleDrawableAura
);
59 #endif // UI_TOUCH_SELECTION_TOUCH_HANDLE_DRAWABLE_AURA_H_