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

Side by Side Diff: content/browser/android/composited_touch_handle_drawable.h

Issue 759433002: Reland: Move TouchSelectionController from content to ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Excluded ui/touch_selection from Windows GN build Created 6 years 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 | « content/browser/BUILD.gn ('k') | content/browser/android/composited_touch_handle_drawable.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 CONTENT_BROWSER_ANDROID_COMPOSITED_TOUCH_HANDLE_DRAWABLE_H_ 5 #ifndef CONTENT_BROWSER_ANDROID_COMPOSITED_TOUCH_HANDLE_DRAWABLE_H_
6 #define CONTENT_BROWSER_ANDROID_COMPOSITED_TOUCH_HANDLE_DRAWABLE_H_ 6 #define CONTENT_BROWSER_ANDROID_COMPOSITED_TOUCH_HANDLE_DRAWABLE_H_
7 7
8 #include "content/browser/renderer_host/input/touch_handle.h" 8 #include "ui/touch_selection/touch_handle.h"
9 9
10 #include "base/android/jni_android.h" 10 #include "base/android/jni_android.h"
11 #include "cc/layers/ui_resource_layer.h" 11 #include "cc/layers/ui_resource_layer.h"
12 12
13 namespace content { 13 namespace content {
14 14
15 // Touch handle drawable implementation backed by a cc layer. 15 // Touch handle drawable implementation backed by a cc layer.
16 class CompositedTouchHandleDrawable : public TouchHandleDrawable { 16 class CompositedTouchHandleDrawable : public ui::TouchHandleDrawable {
17 public: 17 public:
18 CompositedTouchHandleDrawable(cc::Layer* root_layer, 18 CompositedTouchHandleDrawable(cc::Layer* root_layer,
19 float dpi_scale, 19 float dpi_scale,
20 jobject context); 20 jobject context);
21 virtual ~CompositedTouchHandleDrawable(); 21 virtual ~CompositedTouchHandleDrawable();
22 22
23 // TouchHandleDrawable implementation. 23 // ui::TouchHandleDrawable implementation.
24 virtual void SetEnabled(bool enabled) override; 24 virtual void SetEnabled(bool enabled) override;
25 virtual void SetOrientation(TouchHandleOrientation orientation) override; 25 virtual void SetOrientation(ui::TouchHandleOrientation orientation) override;
26 virtual void SetAlpha(float alpha) override; 26 virtual void SetAlpha(float alpha) override;
27 virtual void SetFocus(const gfx::PointF& position) override; 27 virtual void SetFocus(const gfx::PointF& position) override;
28 virtual bool IntersectsWith(const gfx::RectF& rect) const override; 28 virtual bool IntersectsWith(const gfx::RectF& rect) const override;
29 29
30 static bool RegisterHandleViewResources(JNIEnv* env); 30 static bool RegisterHandleViewResources(JNIEnv* env);
31 31
32 private: 32 private:
33 void Detach(); 33 void Detach();
34 gfx::RectF BoundingRect() const; 34 gfx::RectF BoundingRect() const;
35 35
36 const float dpi_scale_; 36 const float dpi_scale_;
37 TouchHandleOrientation orientation_; 37 ui::TouchHandleOrientation orientation_;
38 gfx::PointF focal_position_; 38 gfx::PointF focal_position_;
39 gfx::Vector2dF focal_offset_from_origin_; 39 gfx::Vector2dF focal_offset_from_origin_;
40 scoped_refptr<cc::UIResourceLayer> layer_; 40 scoped_refptr<cc::UIResourceLayer> layer_;
41 41
42 DISALLOW_COPY_AND_ASSIGN(CompositedTouchHandleDrawable); 42 DISALLOW_COPY_AND_ASSIGN(CompositedTouchHandleDrawable);
43 }; 43 };
44 44
45 } // namespace content 45 } // namespace content
46 46
47 #endif // CONTENT_BROWSER_ANDROID_COMPOSITED_TOUCH_HANDLE_DRAWABLE_H_ 47 #endif // CONTENT_BROWSER_ANDROID_COMPOSITED_TOUCH_HANDLE_DRAWABLE_H_
OLDNEW
« no previous file with comments | « content/browser/BUILD.gn ('k') | content/browser/android/composited_touch_handle_drawable.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698