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 34b257116a4d2167bca86281b1f505a417d64cb2..ff92f4150bda2444054fe4e3adf4bacc64d3b5a5 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/user_agent.h" |
#include "webkit/glue/webmenuitem.h" |
@@ -78,7 +79,8 @@ 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), |
@@ -86,6 +88,8 @@ ContentViewCoreImpl::ContentViewCoreImpl(JNIEnv* env, jobject obj, |
DCHECK(web_contents) << |
"A ContentViewCoreImpl should be created with a valid WebContents."; |
+ window_android_ = window_android; |
David Trainor- moved to gerrit
2012/09/10 20:51:05
Put this up with java_ref_, just make sure you do
aurimas (slooooooooow)
2012/09/10 23:48:47
Done.
|
+ |
// TODO(leandrogracia): make use of the hardware_accelerated argument. |
InitJNI(env, obj); |
@@ -520,6 +524,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. |
@@ -533,10 +541,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); |
} |