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

Unified Diff: ui/android/view_android.h

Issue 2103243002: Factor out ContentViewAndroidDelegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 5 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: ui/android/view_android.h
diff --git a/ui/android/view_android.h b/ui/android/view_android.h
index 9ceee0a5e437a49eec647c6931faad42838450bd..9e02c580fec913e18c0a570d8d1b2a2b030c0b86 100644
--- a/ui/android/view_android.h
+++ b/ui/android/view_android.h
@@ -10,6 +10,7 @@
#include "base/android/scoped_java_ref.h"
#include "base/memory/ref_counted.h"
#include "ui/android/ui_android_export.h"
+#include "ui/gfx/geometry/rect_f.h"
namespace cc {
class Layer;
@@ -25,9 +26,12 @@ class WindowAndroid;
class UI_ANDROID_EXPORT ViewAndroid {
public:
// Used to construct a root view.
- ViewAndroid(const base::android::JavaRef<jobject>& delegate,
+ ViewAndroid(const base::android::JavaRef<jobject>& context,
+ const base::android::JavaRef<jobject>& delegate,
WindowAndroid* root_window);
+ static bool RegisterWindowAndroid(JNIEnv* env);
+
// Used to construct a child view.
ViewAndroid();
~ViewAndroid();
@@ -40,11 +44,6 @@ class UI_ANDROID_EXPORT ViewAndroid {
// nodes and must not be called for children.
void SetWindowAndroid(WindowAndroid* root_window);
- // Returns the Java delegate for this view. This is used to delegate work
- // up to the embedding view (or the embedder that can deal with the
- // implementation details).
- const base::android::JavaRef<jobject>& GetViewAndroidDelegate() const;
-
// Used to return and set the layer for this view. May be |null|.
cc::Layer* GetLayer() const;
void SetLayer(scoped_refptr<cc::Layer> layer);
@@ -53,11 +52,17 @@ class UI_ANDROID_EXPORT ViewAndroid {
void AddChild(ViewAndroid* child);
void RemoveChild(ViewAndroid* child);
+ base::android::ScopedJavaLocalRef<jobject> AcquireAnchorView();
+ void SetAnchorRect(const jobject& anchor,
no sievers 2016/07/14 23:14:32 nit: you can use 'const JavaRef<jobject>&>' for th
Jinsuk Kim 2016/07/15 05:46:27 Done.
+ const gfx::RectF& bounds);
+ void RemoveAnchorView(const jobject& anchor);
+
private:
ViewAndroid* parent_;
std::list<ViewAndroid*> children_;
WindowAndroid* window_;
scoped_refptr<cc::Layer> layer_;
+ base::android::ScopedJavaGlobalRef<jobject> java_ref_;
base::android::ScopedJavaGlobalRef<jobject> delegate_;
DISALLOW_COPY_AND_ASSIGN(ViewAndroid);

Powered by Google App Engine
This is Rietveld 408576698