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

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: Addressed review comments 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
« no previous file with comments | « ui/touch_selection/DEPS ('k') | ui/touch_selection/touch_handle_drawable_aura.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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), in coordinate
48 // space of selection controller client (i.e. handle's parent).
49 gfx::PointF focal_position_;
50
51 // Window bounds relative to the focal position.
52 gfx::RectF relative_bounds_;
53
54 DISALLOW_COPY_AND_ASSIGN(TouchHandleDrawableAura);
55 };
56
57 } // namespace ui
58
59 #endif // UI_TOUCH_SELECTION_TOUCH_HANDLE_DRAWABLE_AURA_H_
OLDNEW
« no previous file with comments | « ui/touch_selection/DEPS ('k') | ui/touch_selection/touch_handle_drawable_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698