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

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

Issue 481683003: Support for Adaptive Handle Orientation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added corresponding methods in Aura Created 5 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 unified diff | Download patch
OLDNEW
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 12 matching lines...) Expand all
23 : public TouchHandleDrawable { 23 : public TouchHandleDrawable {
24 public: 24 public:
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 // TODO(AviD): Implement adaptive handle orientation logic for Aura
33 // TouchHandleDrawable: 34 // TouchHandleDrawable:
34 void SetEnabled(bool enabled) override; 35 void SetEnabled(bool enabled) override;
35 void SetOrientation(TouchHandleOrientation orientation) override; 36 void SetOrientation(TouchHandleOrientation orientation,
37 bool mirror_vertical,
38 bool mirror_horizontal) override;
39 void SetOrigin(const gfx::PointF& position) override;
36 void SetAlpha(float alpha) override; 40 void SetAlpha(float alpha) override;
37 void SetFocus(const gfx::PointF& position) override;
38 gfx::RectF GetVisibleBounds() const override; 41 gfx::RectF GetVisibleBounds() const override;
42 const float GetDrawableHorizontalPaddingRatio() const override;
39 43
40 aura_extra::ImageWindowDelegate* window_delegate_; 44 aura_extra::ImageWindowDelegate* window_delegate_;
41 scoped_ptr<aura::Window> window_; 45 scoped_ptr<aura::Window> window_;
42 bool enabled_; 46 bool enabled_;
43 float alpha_; 47 float alpha_;
44 ui::TouchHandleOrientation orientation_; 48 ui::TouchHandleOrientation orientation_;
45 49
46 // Focal position of the handle set via SetFocus (normally located on the 50 // 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 51 // intersection of the cursor line and the text base line), in coordinate
48 // space of selection controller client (i.e. handle's parent). 52 // space of selection controller client (i.e. handle's parent).
49 gfx::PointF focal_position_; 53 gfx::PointF focal_position_;
50 54
51 // Window bounds relative to the focal position. 55 // Window bounds relative to the focal position.
52 gfx::RectF relative_bounds_; 56 gfx::RectF relative_bounds_;
53 57
54 DISALLOW_COPY_AND_ASSIGN(TouchHandleDrawableAura); 58 DISALLOW_COPY_AND_ASSIGN(TouchHandleDrawableAura);
55 }; 59 };
56 60
57 } // namespace ui 61 } // namespace ui
58 62
59 #endif // UI_TOUCH_SELECTION_TOUCH_HANDLE_DRAWABLE_AURA_H_ 63 #endif // UI_TOUCH_SELECTION_TOUCH_HANDLE_DRAWABLE_AURA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698