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

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

Issue 1046783002: wip: Aura-specific implementation of unified touch selection: touch_selection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moving the responsibility for showing the menu into the client. Created 5 years, 8 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/aura_extra/image_window_delegate.h"
9 #include "ui/touch_selection/touch_handle.h"
10 #include "ui/touch_selection/touch_handle_orientation.h"
11
12 namespace ui {
13
14 // TODO: remove export
15 class UI_TOUCH_SELECTION_EXPORT TouchHandleDrawableAura : public TouchHandleDraw able {
16 public:
17 explicit TouchHandleDrawableAura(aura::Window* parent);
18 ~TouchHandleDrawableAura() override;
19
20 // Returns the maximum width/height that can be occupied by a handle image.
21 static gfx::Size GetMaxHandleImageSize();
22
23 private:
24 void UpdateBounds();
25
26 // TouchHandleDrawable:
27 void SetEnabled(bool enabled) override;
28 void SetOrientation(TouchHandleOrientation orientation) override;
29 void SetAlpha(float alpha) override;
30 void SetFocus(const gfx::PointF& position) override;
31 gfx::RectF GetVisibleBounds() const override;
32
33 aura_extra::ImageWindowDelegate* window_delegate_;
34 scoped_ptr<aura::Window> window_;
35 bool enabled_;
36 float alpha_;
37 TouchHandleOrientation orientation_;
38
39 // Focal position of the handle set via SetFocus (normally located on the
40 // intersection of the cursor line and the text base line).
41 gfx::PointF focal_position_;
42
43 // Window bounds relative to the focal position.
44 gfx::RectF relative_bounds_;
45
46 DISALLOW_COPY_AND_ASSIGN(TouchHandleDrawableAura);
47 };
48
49 } // namespace ui
50
51 #endif // UI_TOUCH_SELECTION_TOUCH_HANDLE_DRAWABLE_AURA_H_
OLDNEW
« no previous file with comments | « ui/touch_selection/selection_event_type.h ('k') | ui/touch_selection/touch_handle_drawable_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698