Index: content/browser/android/content_view_core_impl.cc |
diff --git a/content/browser/android/content_view_core_impl.cc b/content/browser/android/content_view_core_impl.cc |
index 79136e1b67c2a5aecce21c262df26229c43cff32..385047b81a3a460e7a1e58473514cc349869cb42 100644 |
--- a/content/browser/android/content_view_core_impl.cc |
+++ b/content/browser/android/content_view_core_impl.cc |
@@ -34,6 +34,7 @@ |
#include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" |
#include "third_party/WebKit/Source/WebKit/chromium/public/android/WebInputEventFactory.h" |
#include "ui/gfx/android/java_bitmap.h" |
+#include "ui/gfx/android/window_android.h" |
#include "webkit/glue/webmenuitem.h" |
#include "webkit/user_agent/user_agent_util.h" |
@@ -78,11 +79,13 @@ ContentViewCore* ContentViewCore::GetNativeContentViewCore(JNIEnv* env, |
ContentViewCoreImpl::ContentViewCoreImpl(JNIEnv* env, jobject obj, |
bool hardware_accelerated, |
bool take_ownership_of_web_contents, |
- WebContents* web_contents) |
+ WebContents* web_contents, |
+ WindowAndroid* window_android) |
: java_ref_(env, obj), |
web_contents_(static_cast<WebContentsImpl*>(web_contents)), |
owns_web_contents_(take_ownership_of_web_contents), |
- tab_crashed_(false) { |
+ tab_crashed_(false), |
+ window_android_(window_android) { |
DCHECK(web_contents) << |
"A ContentViewCoreImpl should be created with a valid WebContents."; |
@@ -523,6 +526,10 @@ void ContentViewCoreImpl::LoadUrl( |
PostLoadUrl(params.url); |
} |
+WindowAndroid* ContentViewCoreImpl::GetWindowAndroid() { |
+ return window_android_; |
+} |
+ |
void ContentViewCoreImpl::PostLoadUrl(const GURL& url) { |
tab_crashed_ = false; |
// TODO(tedchoc): Update the content view client of the page load request. |
@@ -536,10 +543,12 @@ void ContentViewCoreImpl::PostLoadUrl(const GURL& url) { |
jint Init(JNIEnv* env, jobject obj, |
jboolean hardware_accelerated, |
jboolean take_ownership_of_web_contents, |
- jint native_web_contents) { |
+ jint native_web_contents, |
+ jint native_window) { |
ContentViewCoreImpl* view = new ContentViewCoreImpl( |
env, obj, hardware_accelerated, take_ownership_of_web_contents, |
- reinterpret_cast<WebContents*>(native_web_contents)); |
+ reinterpret_cast<WebContents*>(native_web_contents), |
+ reinterpret_cast<WindowAndroid*>(native_window)); |
return reinterpret_cast<jint>(view); |
} |