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

Unified Diff: chrome/browser/renderer_host/render_view_host.h

Issue 160249: Merge 21685 - Relanding r21673 without reenabling the BrowserTest, which appa... (Closed) Base URL: svn://chrome-svn/chrome/branches/195/src/
Patch Set: Created 11 years, 5 months 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 | « chrome/browser/browser.cc ('k') | chrome/browser/renderer_host/render_view_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/render_view_host.h
===================================================================
--- chrome/browser/renderer_host/render_view_host.h (revision 21805)
+++ chrome/browser/renderer_host/render_view_host.h (working copy)
@@ -149,7 +149,11 @@
// Causes the renderer to invoke the onbeforeunload event handler. The
// result will be returned via ViewMsg_ShouldClose. See also ClosePage which
// will fire the PageUnload event.
- void FirePageBeforeUnload();
+ //
+ // Set bool for_cross_site_transition when this close is just for the current
+ // RenderView in the case of a cross-site transition. False means we're
+ // closing the entire tab.
+ void FirePageBeforeUnload(bool for_cross_site_transition);
// Causes the renderer to close the current page, including running its
// onunload event handler. A ClosePage_ACK message will be sent to the
@@ -617,8 +621,17 @@
// must return to the renderer to unblock it.
IPC::Message* run_modal_reply_msg_;
+ // Set to true when there is a pending ViewMsg_ShouldClose message pending.
+ // This ensures we don't spam the renderer many times to close. When true,
+ // the value of unload_ack_is_for_cross_site_transition_ indicates which type
+ // of unload this is for.
bool is_waiting_for_unload_ack_;
+ // Valid only when is_waiting_for_unload_ack_ is true, this tells us if the
+ // unload request is for closing the entire tab ( = false), or only this
+ // RenderViewHost in the case of a cross-site transition ( = true).
+ bool unload_ack_is_for_cross_site_transition_;
+
bool are_javascript_messages_suppressed_;
// True if the render view can be shut down suddenly.
Property changes on: chrome\browser\renderer_host\render_view_host.h
___________________________________________________________________
Modified: svn:mergeinfo
Merged /trunk/src/chrome/browser/renderer_host/render_view_host.h:r21685
« no previous file with comments | « chrome/browser/browser.cc ('k') | chrome/browser/renderer_host/render_view_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698