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

Unified Diff: android_webview/browser/aw_content_browser_client.cc

Issue 11362183: [Android WebView] AwContentsClient.shouldCreateWindow callback part 1. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase for landing Created 8 years, 1 month 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
« no previous file with comments | « no previous file | android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/browser/aw_content_browser_client.cc
diff --git a/android_webview/browser/aw_content_browser_client.cc b/android_webview/browser/aw_content_browser_client.cc
index 7caa743bc123acbac72edd94ddbdbafc7b49881b..e579e2287770023eaf9a3bcbd5361d594714e60a 100644
--- a/android_webview/browser/aw_content_browser_client.cc
+++ b/android_webview/browser/aw_content_browser_client.cc
@@ -237,10 +237,17 @@ bool AwContentBrowserClient::CanCreateWindow(
content::ResourceContext* context,
int render_process_id,
bool* no_javascript_access) {
- // TODO(boliu): Implement this to power SupportMultipleWindow.
- NOTIMPLEMENTED();
- *no_javascript_access = false;
- return false;
+ // We unconditionally allow popup windows at this stage and will give
+ // the embedder the opporunity to handle displaying of the popup in
+ // WebContentsDelegate::AddContents (via the
+ // AwContentsClient.onCreateWindow callback).
+ // Note that if the embedder has blocked support for creating popup
+ // windows through AwSettings, then we won't get to this point as
+ // the popup creation will have been blocked at the WebKit level.
+ if (no_javascript_access) {
+ *no_javascript_access = false;
+ }
+ return true;
}
std::string AwContentBrowserClient::GetWorkerProcessTitle(const GURL& url,
« no previous file with comments | « no previous file | android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698