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

Side by Side Diff: content/browser/frame_host/render_frame_host_impl.h

Issue 1890493002: PlzNavigate: properly execute BeforeUnload on renderer initiated navigations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase + fixed issue with layout test Created 4 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ 5 #ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_
6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ 6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 void SetNavigationsSuspended(bool suspend, 391 void SetNavigationsSuspended(bool suspend,
392 const base::TimeTicks& proceed_time); 392 const base::TimeTicks& proceed_time);
393 393
394 // Clears any suspended navigation state after a cross-site navigation is 394 // Clears any suspended navigation state after a cross-site navigation is
395 // canceled or suspended. This is important if we later return to this 395 // canceled or suspended. This is important if we later return to this
396 // RenderFrameHost. 396 // RenderFrameHost.
397 void CancelSuspendedNavigations(); 397 void CancelSuspendedNavigations();
398 398
399 // Runs the beforeunload handler for this frame. |for_navigation| indicates 399 // Runs the beforeunload handler for this frame. |for_navigation| indicates
400 // whether this call is for the current frame during a cross-process 400 // whether this call is for the current frame during a cross-process
401 // navigation. False means we're closing the entire tab. 401 // navigation. False means we're closing the entire tab. |is_reload|
402 // indicates whether the navigation is a reload of the page or not. If
403 // |for_navigation| is false, |is_reload| should be false as well.
402 // PlzNavigate: this call happens on all browser-initiated navigations. 404 // PlzNavigate: this call happens on all browser-initiated navigations.
403 void DispatchBeforeUnload(bool for_navigation); 405 void DispatchBeforeUnload(bool for_navigation, bool is_reload);
404 406
405 // Simulate beforeunload ack on behalf of renderer if it's unrenresponsive. 407 // Simulate beforeunload ack on behalf of renderer if it's unrenresponsive.
406 void SimulateBeforeUnloadAck(); 408 void SimulateBeforeUnloadAck();
407 409
408 // Returns true if a call to DispatchBeforeUnload will actually send the 410 // Returns true if a call to DispatchBeforeUnload will actually send the
409 // BeforeUnload IPC. This is the case if the current renderer is live and this 411 // BeforeUnload IPC. This is the case if the current renderer is live and this
410 // frame is the main frame. 412 // frame is the main frame.
411 bool ShouldDispatchBeforeUnload(); 413 bool ShouldDispatchBeforeUnload();
412 414
413 // Update the frame's opener in the renderer process in response to the 415 // Update the frame's opener in the renderer process in response to the
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after
979 981
980 // NOTE: This must be the last member. 982 // NOTE: This must be the last member.
981 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; 983 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_;
982 984
983 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); 985 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl);
984 }; 986 };
985 987
986 } // namespace content 988 } // namespace content
987 989
988 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ 990 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/frame_host/navigator_impl.cc ('k') | content/browser/frame_host/render_frame_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698