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

Side by Side Diff: content/browser/frame_host/navigator_impl.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, 2 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
« no previous file with comments | « no previous file | content/browser/frame_host/render_frame_host_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/navigator_impl.h" 5 #include "content/browser/frame_host/navigator_impl.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "content/browser/frame_host/frame_tree.h" 10 #include "content/browser/frame_host/frame_tree.h"
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 return false; // Unable to create the desired RenderFrameHost. 307 return false; // Unable to create the desired RenderFrameHost.
308 308
309 // Make sure no code called via RFHM::Navigate clears the pending entry. 309 // Make sure no code called via RFHM::Navigate clears the pending entry.
310 CHECK_EQ(controller_->GetPendingEntry(), &entry); 310 CHECK_EQ(controller_->GetPendingEntry(), &entry);
311 311
312 // For security, we should never send non-Web-UI URLs to a Web UI renderer. 312 // For security, we should never send non-Web-UI URLs to a Web UI renderer.
313 // Double check that here. 313 // Double check that here.
314 CheckWebUIRendererDoesNotDisplayNormalURL(dest_render_frame_host, dest_url); 314 CheckWebUIRendererDoesNotDisplayNormalURL(dest_render_frame_host, dest_url);
315 315
316 // Notify observers that we will navigate in this RenderFrame. 316 // Notify observers that we will navigate in this RenderFrame.
317 if (delegate_) { 317 if (delegate_ && !dest_render_frame_host->are_navigations_suspended()) {
318 delegate_->AboutToNavigateRenderFrame(frame_tree_node->current_frame_host(), 318 delegate_->AboutToNavigateRenderFrame(frame_tree_node->current_frame_host(),
yurys 2015/09/22 19:31:43 Should we move this call closer to the two places
319 dest_render_frame_host); 319 dest_render_frame_host);
320 } 320 }
321 321
322 // Navigate in the desired RenderFrameHost. 322 // Navigate in the desired RenderFrameHost.
323 // We can skip this step in the rare case that this is a transfer navigation 323 // We can skip this step in the rare case that this is a transfer navigation
324 // which began in the chosen RenderFrameHost, since the request has already 324 // which began in the chosen RenderFrameHost, since the request has already
325 // been issued. In that case, simply resume the response. 325 // been issued. In that case, simply resume the response.
326 bool is_transfer_to_same = 326 bool is_transfer_to_same =
327 entry.transferred_global_request_id().child_id != -1 && 327 entry.transferred_global_request_id().child_id != -1 &&
328 entry.transferred_global_request_id().child_id == 328 entry.transferred_global_request_id().child_id ==
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after
945 entry->set_should_replace_entry(pending_entry->should_replace_entry()); 945 entry->set_should_replace_entry(pending_entry->should_replace_entry());
946 entry->SetRedirectChain(pending_entry->GetRedirectChain()); 946 entry->SetRedirectChain(pending_entry->GetRedirectChain());
947 } 947 }
948 controller_->SetPendingEntry(entry.Pass()); 948 controller_->SetPendingEntry(entry.Pass());
949 if (delegate_) 949 if (delegate_)
950 delegate_->NotifyChangedNavigationState(content::INVALIDATE_TYPE_URL); 950 delegate_->NotifyChangedNavigationState(content::INVALIDATE_TYPE_URL);
951 } 951 }
952 } 952 }
953 953
954 } // namespace content 954 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/frame_host/render_frame_host_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698