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

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

Issue 481683003: Support for Adaptive Handle Orientation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 5 years, 2 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 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_POPUP_TOUCH_HANDLE_DRAWABLE_H_ 5 #ifndef CONTENT_BROWSER_ANDROID_POPUP_TOUCH_HANDLE_DRAWABLE_H_
6 #define CONTENT_BROWSER_ANDROID_POPUP_TOUCH_HANDLE_DRAWABLE_H_ 6 #define CONTENT_BROWSER_ANDROID_POPUP_TOUCH_HANDLE_DRAWABLE_H_
7 7
8 #include "ui/touch_selection/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 "base/android/jni_weak_ref.h" 11 #include "base/android/jni_weak_ref.h"
12 12
13 namespace content { 13 namespace content {
14 14
15 class ContentViewCore; 15 class ContentViewCore;
16 16
17 // Touch handle drawable backed by an Android PopupWindow. 17 // Touch handle drawable backed by an Android PopupWindow.
18 class PopupTouchHandleDrawable : public ui::TouchHandleDrawable { 18 class PopupTouchHandleDrawable : public ui::TouchHandleDrawable {
19 public: 19 public:
20 static scoped_ptr<PopupTouchHandleDrawable> Create( 20 static scoped_ptr<PopupTouchHandleDrawable> Create(
21 ContentViewCore* content_view_core); 21 ContentViewCore* content_view_core);
22 ~PopupTouchHandleDrawable() override; 22 ~PopupTouchHandleDrawable() override;
23 23
24 // ui::TouchHandleDrawable implementation. 24 // ui::TouchHandleDrawable implementation.
25 void SetEnabled(bool enabled) override; 25 void SetEnabled(bool enabled) override;
26 void SetOrientation(ui::TouchHandleOrientation orientation) override; 26 void SetOrientation(ui::TouchHandleOrientation orientation,
27 bool mirror_vertical,
28 bool mirror_horizontal) override;
29 void SetOrigin(const gfx::PointF& origin) override;
27 void SetAlpha(float alpha) override; 30 void SetAlpha(float alpha) override;
28 void SetFocus(const gfx::PointF& position) override;
29 gfx::RectF GetVisibleBounds() const override; 31 gfx::RectF GetVisibleBounds() const override;
32 float GetDrawableHorizontalPaddingRatio() const override;
30 33
31 static bool RegisterPopupTouchHandleDrawable(JNIEnv* env); 34 static bool RegisterPopupTouchHandleDrawable(JNIEnv* env);
32 35
33 private: 36 private:
34 PopupTouchHandleDrawable(JNIEnv* env, jobject obj, float dpi_scale); 37 PopupTouchHandleDrawable(JNIEnv* env, jobject obj, float dpi_scale);
35 38
36 JavaObjectWeakGlobalRef java_ref_; 39 JavaObjectWeakGlobalRef java_ref_;
37 40
38 const float dpi_scale_; 41 const float dpi_scale_;
42 float drawable_horizontal_padding_ratio_;
39 43
40 DISALLOW_COPY_AND_ASSIGN(PopupTouchHandleDrawable); 44 DISALLOW_COPY_AND_ASSIGN(PopupTouchHandleDrawable);
41 }; 45 };
42 46
43 } // namespace content 47 } // namespace content
44 48
45 #endif // CONTENT_BROWSER_ANDROID_POPUP_TOUCH_HANDLE_DRAWABLE_H_ 49 #endif // CONTENT_BROWSER_ANDROID_POPUP_TOUCH_HANDLE_DRAWABLE_H_
OLDNEW
« no previous file with comments | « content/browser/android/composited_touch_handle_drawable.cc ('k') | content/browser/android/popup_touch_handle_drawable.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698