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

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

Issue 996373002: Add Aura handles to be used in unified touch selection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed OnNativeViewMoved Created 5 years, 7 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_HANDLE_DRAWABLE_AURA_H_
6 #define UI_TOUCH_SELECTION_TOUCH_HANDLE_DRAWABLE_AURA_H_
7
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"
11
12 namespace aura {
13 class Window;
14 }
15
16 namespace aura_extra {
17 class ImageWindowDelegate;
18 }
19
20 namespace ui {
21
22 class UI_TOUCH_SELECTION_EXPORT TouchHandleDrawableAura
23 : public TouchHandleDrawable {
24 public:
25 explicit TouchHandleDrawableAura(aura::Window* parent);
26 ~TouchHandleDrawableAura() override;
27
28 private:
29 void UpdateBounds();
30
31 bool IsVisible() const;
32
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;
39
40 aura_extra::ImageWindowDelegate* window_delegate_;
41 scoped_ptr<aura::Window> window_;
42 bool enabled_;
43 float alpha_;
44 ui::TouchHandleOrientation orientation_;
45
46 // Focal position of the handle set via SetFocus (normally located on the
47 // intersection of the cursor line and the text base line).
48 gfx::PointF focal_position_;
sadrul 2015/05/11 16:06:57 focal_position_ is in the parent's coord space? Ca
mohsen 2015/05/11 16:55:40 Yes, Done.
49
50 // Window bounds relative to the focal position.
51 gfx::RectF relative_bounds_;
52
53 DISALLOW_COPY_AND_ASSIGN(TouchHandleDrawableAura);
54 };
55
56 } // namespace ui
57
58 #endif // UI_TOUCH_SELECTION_TOUCH_HANDLE_DRAWABLE_AURA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698