Index: android_webview/native/aw_web_contents_delegate.cc |
diff --git a/android_webview/native/aw_web_contents_delegate.cc b/android_webview/native/aw_web_contents_delegate.cc |
index 761061226aebf5018e4c487d122106b1a09add4b..4c2f4a14500437c7f027dd9d0c0e7024e3f78f94 100644 |
--- a/android_webview/native/aw_web_contents_delegate.cc |
+++ b/android_webview/native/aw_web_contents_delegate.cc |
@@ -79,9 +79,14 @@ void AwWebContentsDelegate::AddNewContents(content::WebContents* source, |
GetJavaDelegate(env).obj(), is_dialog, user_gesture); |
if (create_popup) { |
- // TODO(benm): Implement, taking ownership of new_contents. |
- NOTIMPLEMENTED() << "Popup windows are currently not supported for " |
- << "the chromium powered Android WebView."; |
+ // The embedder would like to display the popup and we will receive |
+ // a callback from them later with an AwContents to use to displau |
joth
2012/11/16 06:24:31
typo: dispau
benm (inactive)
2012/11/16 12:29:09
Done.
|
+ // it. The source AwContents takes ownership of the new WebContents |
+ // until then, at which point we will swap it out into the new |
+ // AwContents. |
+ AwContents::FromWebContents(source)->SetPendingWebContentsForPopup( |
+ new_contents); |
+ new_contents->WasHidden(); |
} else { |
// The embedder has forgone their chance to display this popup |
// window, so we're done with the WebContents now. |