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

Unified Diff: android_webview/renderer/aw_content_renderer_client.cc

Issue 2498463002: RenderWidget/RenderView: encapsulate ViewHostMsg_Show, etc, in a callback (Closed)
Patch Set: More IPC messing. Created 4 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
Index: android_webview/renderer/aw_content_renderer_client.cc
diff --git a/android_webview/renderer/aw_content_renderer_client.cc b/android_webview/renderer/aw_content_renderer_client.cc
index 20754a7156cdf43ad711b98db8ba4daffa74cafe..cf06e10423d0c120520fbc3c96d998e6d2fb54a4 100644
--- a/android_webview/renderer/aw_content_renderer_client.cc
+++ b/android_webview/renderer/aw_content_renderer_client.cc
@@ -92,7 +92,7 @@ void AwContentRendererClient::RenderThreadStarted() {
bool AwContentRendererClient::HandleNavigation(
content::RenderFrame* render_frame,
bool is_content_initiated,
- int opener_id,
+ bool render_view_was_created_with_opener,
blink::WebFrame* frame,
const blink::WebURLRequest& request,
blink::WebNavigationType type,
@@ -129,7 +129,14 @@ bool AwContentRendererClient::HandleNavigation(
// use NavigationInterception throttle to handle the call as that can
// be deferred until after the java side has been constructed.
alexmos 2016/11/17 09:51:09 Do you understand this comment? I can't tell why
ncarter (slow) 2016/11/17 19:33:11 I interpret this comment to mean: "when a new WebC
alexmos 2016/11/17 22:27:43 Acknowledged.
- if (opener_id != MSG_ROUTING_NONE) {
+ //
+ // TODO(nick): |render_view_was_created_with_opener| was plumbed in to
+ // preserve the existing code behavior, but it doesn't appear to be correct.
+ // In particular, this value will be true for the initial navigation of a
+ // RenderView created via window.open(), but it will also be true for all
+ // subsequent navigations in that RenderView, no matter how they are
+ // initiated.
+ if (render_view_was_created_with_opener) {
alexmos 2016/11/17 09:51:09 You could also name this render_view_was_created_b
ncarter (slow) 2016/11/17 19:33:11 render_view_was_created_by_renderer is a better mo
return false;
}

Powered by Google App Engine
This is Rietveld 408576698