Add remoting and PPAPI tests to GN build
[chromium-blink-merge.git] / content / browser / android / popup_touch_handle_drawable.h
blob5b5c334e8a5ad2fb658eeaf0aaee40d2a73e14de
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
3 // found in the LICENSE file.
5 #ifndef CONTENT_BROWSER_ANDROID_POPUP_TOUCH_HANDLE_DRAWABLE_H_
6 #define CONTENT_BROWSER_ANDROID_POPUP_TOUCH_HANDLE_DRAWABLE_H_
8 #include "ui/touch_selection/touch_handle.h"
10 #include "base/android/jni_android.h"
12 namespace content {
14 // Touch handle drawable backed by an Android PopupWindow.
15 class PopupTouchHandleDrawable : public ui::TouchHandleDrawable {
16 public:
17 PopupTouchHandleDrawable(base::android::ScopedJavaLocalRef<jobject> drawable,
18 float dpi_scale);
19 ~PopupTouchHandleDrawable() override;
21 // ui::TouchHandleDrawable implementation.
22 void SetEnabled(bool enabled) override;
23 void SetOrientation(ui::TouchHandleOrientation orientation) override;
24 void SetAlpha(float alpha) override;
25 void SetFocus(const gfx::PointF& position) override;
26 gfx::RectF GetVisibleBounds() const override;
28 static bool RegisterPopupTouchHandleDrawable(JNIEnv* env);
30 private:
31 const float dpi_scale_;
32 base::android::ScopedJavaGlobalRef<jobject> drawable_;
34 DISALLOW_COPY_AND_ASSIGN(PopupTouchHandleDrawable);
37 } // namespace content
39 #endif // CONTENT_BROWSER_ANDROID_POPUP_TOUCH_HANDLE_DRAWABLE_H_