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

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

Issue 2919593007: Always update the omnibox URL when cancelling via onbeforeunload (Closed)
Patch Set: Test tweaking Created 3 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 #include "content/browser/frame_host/render_frame_host_impl.h" 5 #include "content/browser/frame_host/render_frame_host_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 1614 matching lines...) Expand 10 before | Expand all | Expand 10 after
1625 if (IsBrowserSideNavigationEnabled() && unload_ack_is_for_navigation_) { 1625 if (IsBrowserSideNavigationEnabled() && unload_ack_is_for_navigation_) {
1626 // TODO(clamy): see if before_unload_end_time should be transmitted to the 1626 // TODO(clamy): see if before_unload_end_time should be transmitted to the
1627 // Navigator. 1627 // Navigator.
1628 frame_tree_node_->navigator()->OnBeforeUnloadACK( 1628 frame_tree_node_->navigator()->OnBeforeUnloadACK(
1629 frame_tree_node_, proceed); 1629 frame_tree_node_, proceed);
1630 } else { 1630 } else {
1631 frame_tree_node_->render_manager()->OnBeforeUnloadACK( 1631 frame_tree_node_->render_manager()->OnBeforeUnloadACK(
1632 unload_ack_is_for_navigation_, proceed, 1632 unload_ack_is_for_navigation_, proceed,
1633 before_unload_end_time); 1633 before_unload_end_time);
1634 } 1634 }
1635
1636 // If canceled, notify the delegate to cancel its pending navigation entry.
1637 if (!proceed)
1638 render_view_host_->GetDelegate()->DidCancelLoading();
1639 } 1635 }
1640 1636
1641 bool RenderFrameHostImpl::IsWaitingForUnloadACK() const { 1637 bool RenderFrameHostImpl::IsWaitingForUnloadACK() const {
1642 return render_view_host_->is_waiting_for_close_ack_ || 1638 return render_view_host_->is_waiting_for_close_ack_ ||
1643 is_waiting_for_swapout_ack_; 1639 is_waiting_for_swapout_ack_;
1644 } 1640 }
1645 1641
1646 void RenderFrameHostImpl::OnSwapOutACK() { 1642 void RenderFrameHostImpl::OnSwapOutACK() {
1647 OnSwappedOut(); 1643 OnSwappedOut();
1648 } 1644 }
(...skipping 2264 matching lines...) Expand 10 before | Expand all | Expand 10 after
3913 } 3909 }
3914 3910
3915 void RenderFrameHostImpl::ForwardGetInterfaceToRenderFrame( 3911 void RenderFrameHostImpl::ForwardGetInterfaceToRenderFrame(
3916 const std::string& interface_name, 3912 const std::string& interface_name,
3917 mojo::ScopedMessagePipeHandle pipe) { 3913 mojo::ScopedMessagePipeHandle pipe) {
3918 GetRemoteInterfaces()->GetInterface(interface_name, std::move(pipe)); 3914 GetRemoteInterfaces()->GetInterface(interface_name, std::move(pipe));
3919 } 3915 }
3920 #endif 3916 #endif
3921 3917
3922 } // namespace content 3918 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698