OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef UI_TOUCH_SELECTION_TOUCH_HANDLE_DRAWABLE_AURA_H_ | 5 #ifndef UI_TOUCH_SELECTION_TOUCH_HANDLE_DRAWABLE_AURA_H_ |
6 #define UI_TOUCH_SELECTION_TOUCH_HANDLE_DRAWABLE_AURA_H_ | 6 #define UI_TOUCH_SELECTION_TOUCH_HANDLE_DRAWABLE_AURA_H_ |
7 | 7 |
8 #include "ui/touch_selection/touch_handle.h" | 8 #include "ui/touch_selection/touch_handle.h" |
9 #include "ui/touch_selection/touch_handle_orientation.h" | 9 #include "ui/touch_selection/touch_handle_orientation.h" |
10 #include "ui/touch_selection/ui_touch_selection_export.h" | 10 #include "ui/touch_selection/ui_touch_selection_export.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 explicit TouchHandleDrawableAura(aura::Window* parent); | 25 explicit TouchHandleDrawableAura(aura::Window* parent); |
26 ~TouchHandleDrawableAura() override; | 26 ~TouchHandleDrawableAura() override; |
27 | 27 |
28 private: | 28 private: |
29 void UpdateBounds(); | 29 void UpdateBounds(); |
30 | 30 |
31 bool IsVisible() const; | 31 bool IsVisible() const; |
32 | 32 |
33 // TouchHandleDrawable: | 33 // TouchHandleDrawable: |
34 void SetEnabled(bool enabled) override; | 34 void SetEnabled(bool enabled) override; |
35 void SetOrientation(TouchHandleOrientation orientation) override; | 35 void SetOrientation(TouchHandleOrientation orientation, |
| 36 bool mirror_vertical, |
| 37 bool mirror_horizontal) override; |
| 38 void SetOrigin(const gfx::PointF& position) override; |
36 void SetAlpha(float alpha) override; | 39 void SetAlpha(float alpha) override; |
37 void SetFocus(const gfx::PointF& position) override; | |
38 gfx::RectF GetVisibleBounds() const override; | 40 gfx::RectF GetVisibleBounds() const override; |
| 41 float GetDrawableHorizontalPaddingRatio() const override; |
39 | 42 |
40 aura_extra::ImageWindowDelegate* window_delegate_; | 43 aura_extra::ImageWindowDelegate* window_delegate_; |
41 scoped_ptr<aura::Window> window_; | 44 scoped_ptr<aura::Window> window_; |
42 bool enabled_; | 45 bool enabled_; |
43 float alpha_; | 46 float alpha_; |
44 ui::TouchHandleOrientation orientation_; | 47 ui::TouchHandleOrientation orientation_; |
45 | 48 |
46 // Focal position of the handle set via SetFocus (normally located on the | 49 // Origin position of the handle set via SetOrigin, in coordinate space of |
47 // intersection of the cursor line and the text base line), in coordinate | 50 // selection controller client (i.e. handle's parent). |
48 // space of selection controller client (i.e. handle's parent). | 51 gfx::PointF origin_position_; |
49 gfx::PointF focal_position_; | |
50 | 52 |
51 // Window bounds relative to the focal position. | 53 // Window bounds relative to the focal position. |
52 gfx::RectF relative_bounds_; | 54 gfx::RectF relative_bounds_; |
53 | 55 |
54 DISALLOW_COPY_AND_ASSIGN(TouchHandleDrawableAura); | 56 DISALLOW_COPY_AND_ASSIGN(TouchHandleDrawableAura); |
55 }; | 57 }; |
56 | 58 |
57 } // namespace ui | 59 } // namespace ui |
58 | 60 |
59 #endif // UI_TOUCH_SELECTION_TOUCH_HANDLE_DRAWABLE_AURA_H_ | 61 #endif // UI_TOUCH_SELECTION_TOUCH_HANDLE_DRAWABLE_AURA_H_ |
OLD | NEW |