Index: android_webview/native/aw_contents.cc |
diff --git a/android_webview/native/aw_contents.cc b/android_webview/native/aw_contents.cc |
index 4a829faba54b118a22fb0e754abd9afe931e9574..3eab578064812c7639b30353df84553c0b96b7e6 100644 |
--- a/android_webview/native/aw_contents.cc |
+++ b/android_webview/native/aw_contents.cc |
@@ -63,6 +63,7 @@ |
#include "content/public/browser/render_process_host.h" |
#include "content/public/browser/render_view_host.h" |
#include "content/public/browser/web_contents.h" |
+#include "content/public/browser/web_contents_source.h" |
#include "content/public/common/message_port_types.h" |
#include "content/public/common/renderer_preferences.h" |
#include "content/public/common/ssl_status.h" |
@@ -320,6 +321,8 @@ static jlong Init(JNIEnv* env, |
// than hard-code the default instance lookup here. |
scoped_ptr<WebContents> web_contents(content::WebContents::Create( |
content::WebContents::CreateParams(AwBrowserContext::GetDefault()))); |
+ WebContentsSource::CreateForWebContentsAndLocation(web_contents.get(), |
+ FROM_HERE); |
// Return an 'uninitialized' instance; most work is deferred until the |
// subsequent SetJavaPeers() call. |
return reinterpret_cast<intptr_t>(new AwContents(web_contents.Pass())); |