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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 216793014: Move dispatchBeforeUnloadEvent to WebFrame, part 2/3. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 | « no previous file | content/shell/renderer/test_runner/test_runner.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 9f3f8eb9e5ae92be3db823466f8610f140c3894d..949975b9cf7ccb53b9522084ed89ffc1802a6c91 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -779,13 +779,13 @@ void RenderFrameImpl::OnNavigate(const FrameMsg_Navigate_Params& params) {
}
void RenderFrameImpl::OnBeforeUnload() {
- // TODO(creis): Move dispatchBeforeUnloadEvent to WebFrame. Until then, this
- // should only be called on the main frame. Eventually, the browser process
- // should dispatch it to every frame that needs it.
+ // TODO(creis): Right now, this is only called on the main frame. Make the
+ // browser process send dispatchBeforeUnloadEvent to every frame that needs
+ // it.
CHECK(!frame_->parent());
base::TimeTicks before_unload_start_time = base::TimeTicks::Now();
- bool proceed = render_view_->webview()->dispatchBeforeUnloadEvent();
+ bool proceed = frame_->dispatchBeforeUnloadEvent();
base::TimeTicks before_unload_end_time = base::TimeTicks::Now();
Send(new FrameHostMsg_BeforeUnload_ACK(routing_id_, proceed,
before_unload_start_time,
« no previous file with comments | « no previous file | content/shell/renderer/test_runner/test_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698