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

Side by Side Diff: android_webview/native/popup_touch_handle_drawable.h

Issue 2863233002: [WebView] Move files from native to browser (Closed)
Patch Set: Created 3 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 2016 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 CONTENT_BROWSER_ANDROID_POPUP_TOUCH_HANDLE_DRAWABLE_H_
6 #define CONTENT_BROWSER_ANDROID_POPUP_TOUCH_HANDLE_DRAWABLE_H_
7
8 #include "ui/touch_selection/touch_handle.h"
9
10 #include <memory>
11
12 #include "base/android/jni_android.h"
13 #include "base/android/jni_weak_ref.h"
14 #include "base/macros.h"
15
16 namespace android_webview {
17
18 // Touch handle drawable backed by an Android PopupWindow.
19 class PopupTouchHandleDrawable : public ui::TouchHandleDrawable {
20 public:
21 PopupTouchHandleDrawable(JNIEnv* env,
22 jobject obj,
23 float horizontal_padding_ratio);
24 ~PopupTouchHandleDrawable() override;
25
26 static bool RegisterPopupTouchHandleDrawable(JNIEnv* env);
27
28 // ui::TouchHandleDrawable implementation.
29 void SetEnabled(bool enabled) override;
30 void SetOrientation(ui::TouchHandleOrientation orientation,
31 bool mirror_vertical,
32 bool mirror_horizontal) override;
33 void SetOrigin(const gfx::PointF& origin) override;
34 void SetAlpha(float alpha) override;
35 gfx::RectF GetVisibleBounds() const override;
36 float GetDrawableHorizontalPaddingRatio() const override;
37
38 private:
39
40 JavaObjectWeakGlobalRef java_ref_;
41
42 const float drawable_horizontal_padding_ratio_;
43
44 DISALLOW_COPY_AND_ASSIGN(PopupTouchHandleDrawable);
45 };
46
47 } // namespace content
48
49 #endif // CONTENT_BROWSER_ANDROID_POPUP_TOUCH_HANDLE_DRAWABLE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698