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

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

Issue 1358153002: Issue AboutToNavigateRenderFrame notification after beforeunload handling. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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_manager.h" 5 #include "content/browser/frame_host/render_frame_host_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 return; 549 return;
550 550
551 if (proceed) { 551 if (proceed) {
552 // Ok to unload the current page, so proceed with the cross-process 552 // Ok to unload the current page, so proceed with the cross-process
553 // navigation. Note that if navigations are not currently suspended, it 553 // navigation. Note that if navigations are not currently suspended, it
554 // might be because the renderer was deemed unresponsive and this call was 554 // might be because the renderer was deemed unresponsive and this call was
555 // already made by ShouldCloseTabOnUnresponsiveRenderer. In that case, it 555 // already made by ShouldCloseTabOnUnresponsiveRenderer. In that case, it
556 // is ok to do nothing here. 556 // is ok to do nothing here.
557 if (pending_render_frame_host_ && 557 if (pending_render_frame_host_ &&
558 pending_render_frame_host_->are_navigations_suspended()) { 558 pending_render_frame_host_->are_navigations_suspended()) {
559 NavigatorDelegate* navigator_delegate =
560 frame_tree_node_->navigator()->GetDelegate();
561 if (navigator_delegate) {
562 navigator_delegate->AboutToNavigateRenderFrame(
563 render_frame_host_.get(), pending_render_frame_host_.get());
564 }
559 pending_render_frame_host_->SetNavigationsSuspended(false, 565 pending_render_frame_host_->SetNavigationsSuspended(false,
560 proceed_time); 566 proceed_time);
561 } 567 }
562 } else { 568 } else {
563 // Current page says to cancel. 569 // Current page says to cancel.
564 CancelPending(); 570 CancelPending();
565 } 571 }
566 } else { 572 } else {
567 // Non-cross-process transition means closing the entire tab. 573 // Non-cross-process transition means closing the entire tab.
568 bool proceed_to_fire_unload; 574 bool proceed_to_fire_unload;
(...skipping 2025 matching lines...) Expand 10 before | Expand all | Expand 10 after
2594 int RenderFrameHostManager::GetOpenerRoutingID(SiteInstance* instance) { 2600 int RenderFrameHostManager::GetOpenerRoutingID(SiteInstance* instance) {
2595 if (!frame_tree_node_->opener()) 2601 if (!frame_tree_node_->opener())
2596 return MSG_ROUTING_NONE; 2602 return MSG_ROUTING_NONE;
2597 2603
2598 return frame_tree_node_->opener() 2604 return frame_tree_node_->opener()
2599 ->render_manager() 2605 ->render_manager()
2600 ->GetRoutingIdForSiteInstance(instance); 2606 ->GetRoutingIdForSiteInstance(instance);
2601 } 2607 }
2602 2608
2603 } // namespace content 2609 } // namespace content
OLDNEW
« content/browser/frame_host/navigator_impl.cc ('K') | « content/browser/frame_host/navigator_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698