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

Unified Diff: content/browser/android/popup_touch_handle_drawable.h

Issue 1341013002: [Android] Move weak ref for PopupWindowTouchHandleDrawable to native (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/android/popup_touch_handle_drawable.h
diff --git a/content/browser/android/popup_touch_handle_drawable.h b/content/browser/android/popup_touch_handle_drawable.h
index 5b5c334e8a5ad2fb658eeaf0aaee40d2a73e14de..84d2673d0bb0fbd607db7ce6b748b0fb45c0aa37 100644
--- a/content/browser/android/popup_touch_handle_drawable.h
+++ b/content/browser/android/popup_touch_handle_drawable.h
@@ -8,14 +8,17 @@
#include "ui/touch_selection/touch_handle.h"
#include "base/android/jni_android.h"
+#include "base/android/jni_weak_ref.h"
namespace content {
+class ContentViewCore;
+
// Touch handle drawable backed by an Android PopupWindow.
class PopupTouchHandleDrawable : public ui::TouchHandleDrawable {
public:
- PopupTouchHandleDrawable(base::android::ScopedJavaLocalRef<jobject> drawable,
- float dpi_scale);
+ static scoped_ptr<PopupTouchHandleDrawable> Create(
+ ContentViewCore* content_view_core);
~PopupTouchHandleDrawable() override;
// ui::TouchHandleDrawable implementation.
@@ -28,8 +31,11 @@ class PopupTouchHandleDrawable : public ui::TouchHandleDrawable {
static bool RegisterPopupTouchHandleDrawable(JNIEnv* env);
private:
+ PopupTouchHandleDrawable(JNIEnv* env, jobject obj, float dpi_scale);
+
+ JavaObjectWeakGlobalRef java_ref_;
+
const float dpi_scale_;
- base::android::ScopedJavaGlobalRef<jobject> drawable_;
DISALLOW_COPY_AND_ASSIGN(PopupTouchHandleDrawable);
};
« no previous file with comments | « content/browser/android/content_view_core_impl.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