diff options
author | ojan@google.com <ojan@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-02 00:44:47 +0000 |
---|---|---|
committer | ojan@google.com <ojan@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-02 00:44:47 +0000 |
commit | 04b4a6c37ac2250bc4e7230c24801d5cf9ffd8e7 (patch) | |
tree | 1e67976bfec449d5f6c4b209630491a4bfde3ffc /chrome/common/render_messages_internal.h | |
parent | 9e43dae7106b6064ebc6580fe111568f1cbdd393 (diff) | |
download | chromium_src-04b4a6c37ac2250bc4e7230c24801d5cf9ffd8e7.zip chromium_src-04b4a6c37ac2250bc4e7230c24801d5cf9ffd8e7.tar.gz chromium_src-04b4a6c37ac2250bc4e7230c24801d5cf9ffd8e7.tar.bz2 |
A bunch of cleanups to beforeunload/unload handling.
1. Remove all the is_closing_browser plumbing. WebContents/TabContents/RenderViewHost/etc really shouldn't (and don't!) need to know anything about whether we're closing the browser or not.
2. Refactor the handling of beforeunload/unload state in browser.cc. I think this makes it considerably easier to reason about the correctness of it.
3. Added a couple TODOs for future cleanups that would have made this change a bit too large.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@273 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/render_messages_internal.h')
-rw-r--r-- | chrome/common/render_messages_internal.h | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/chrome/common/render_messages_internal.h b/chrome/common/render_messages_internal.h index e7f7ea3..d52417f 100644 --- a/chrome/common/render_messages_internal.h +++ b/chrome/common/render_messages_internal.h @@ -418,14 +418,13 @@ IPC_BEGIN_MESSAGES(View, 1) // Instructs the renderer to invoke the frame's shouldClose method, which // runs the onbeforeunload event handler. Expects the result to be returned // via ViewHostMsg_ShouldClose. - IPC_MESSAGE_ROUTED1(ViewMsg_ShouldClose, bool /* is_closing_browser */) + IPC_MESSAGE_ROUTED0(ViewMsg_ShouldClose) // Instructs the renderer to close the current page, including running the // onunload event handler. Expects a ClosePage_ACK message when finished. - IPC_MESSAGE_ROUTED3(ViewMsg_ClosePage, + IPC_MESSAGE_ROUTED2(ViewMsg_ClosePage, int /* new_render_process_host_id */, - int /* new_request_id */, - bool /* is_closing_browser */) + int /* new_request_id */) // Asks the renderer to send back stats on the WebCore cache broken down by // resource types. @@ -939,16 +938,14 @@ IPC_BEGIN_MESSAGES(ViewHost, 2) // return value of the the frame's shouldClose method (which includes the // onbeforeunload handler): true if the user decided to proceed with leaving // the page. - IPC_MESSAGE_ROUTED2(ViewHostMsg_ShouldClose_ACK, - bool /* proceed */, - bool /* is_closing_browser */) + IPC_MESSAGE_ROUTED1(ViewHostMsg_ShouldClose_ACK, + bool /* proceed */) // Indicates that the current page has been closed, after a ClosePage // message. - IPC_MESSAGE_ROUTED3(ViewHostMsg_ClosePage_ACK, + IPC_MESSAGE_ROUTED2(ViewHostMsg_ClosePage_ACK, int /* new_render_process_host_id */, - int /* new_request_id */, - bool /* is_closing_browser */) + int /* new_request_id */) IPC_MESSAGE_ROUTED4(ViewHostMsg_DidDownloadImage, int /* Identifier of the request */, |