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

Unified Diff: content/browser/web_contents/web_contents_android.cc

Issue 2595263002: Introduce ViewRoot forwarding input/view events to native (Closed)
Patch Set: tests Created 3 years, 12 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/web_contents/web_contents_android.cc
diff --git a/content/browser/web_contents/web_contents_android.cc b/content/browser/web_contents/web_contents_android.cc
index 422c0cb334bb6b63148c9121f26558a4c336d3eb..fff42517f17f3568c5df768c7026263d91e687b9 100644
--- a/content/browser/web_contents/web_contents_android.cc
+++ b/content/browser/web_contents/web_contents_android.cc
@@ -40,6 +40,7 @@
#include "net/android/network_library.h"
#include "ui/accessibility/ax_node_data.h"
#include "ui/android/overscroll_refresh_handler.h"
+#include "ui/android/view_root.h"
#include "ui/gfx/android/device_display_info.h"
#include "ui/gfx/android/java_bitmap.h"
#include "ui/gfx/geometry/rect.h"
@@ -665,6 +666,14 @@ void WebContentsAndroid::ReloadLoFiImages(JNIEnv* env,
static_cast<WebContentsImpl*>(web_contents_)->ReloadLoFiImages();
}
+void WebContentsAndroid::InitViewRoot(
+ JNIEnv* env,
+ const base::android::JavaParamRef<jobject>& jobj,
+ const base::android::JavaParamRef<jobject>& jview_root) {
+ ui::ViewRoot* view_root = ui::ViewRoot::FromJavaObject(env, jview_root);
+ view_root->AddChild(web_contents_->GetView()->GetNativeView());
+}
+
int WebContentsAndroid::DownloadImage(
JNIEnv* env,
const base::android::JavaParamRef<jobject>& obj,

Powered by Google App Engine
This is Rietveld 408576698