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

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

Issue 2248873002: Convert WindowOpenDisposition to an enum class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 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/navigator_impl.h" 5 #include "content/browser/frame_host/navigator_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/metrics/histogram_macros.h" 10 #include "base/metrics/histogram_macros.h"
(...skipping 685 matching lines...) Expand 10 before | Expand all | Expand 10 after
696 current_site_instance, url)) { 696 current_site_instance, url)) {
697 dest_url = GURL(url::kAboutBlankURL); 697 dest_url = GURL(url::kAboutBlankURL);
698 } 698 }
699 699
700 int frame_tree_node_id = -1; 700 int frame_tree_node_id = -1;
701 701
702 // Send the navigation to the current FrameTreeNode if it's destined for a 702 // Send the navigation to the current FrameTreeNode if it's destined for a
703 // subframe in the current tab. We'll assume it's for the main frame 703 // subframe in the current tab. We'll assume it's for the main frame
704 // (possibly of a new or different WebContents) otherwise. 704 // (possibly of a new or different WebContents) otherwise.
705 if (SiteIsolationPolicy::UseSubframeNavigationEntries() && 705 if (SiteIsolationPolicy::UseSubframeNavigationEntries() &&
706 disposition == CURRENT_TAB && render_frame_host->GetParent()) { 706 disposition == WindowOpenDisposition::CURRENT_TAB &&
707 render_frame_host->GetParent()) {
707 frame_tree_node_id = 708 frame_tree_node_id =
708 render_frame_host->frame_tree_node()->frame_tree_node_id(); 709 render_frame_host->frame_tree_node()->frame_tree_node_id();
709 } 710 }
710 711
711 OpenURLParams params(dest_url, referrer, frame_tree_node_id, disposition, 712 OpenURLParams params(dest_url, referrer, frame_tree_node_id, disposition,
712 ui::PAGE_TRANSITION_LINK, 713 ui::PAGE_TRANSITION_LINK,
713 true /* is_renderer_initiated */); 714 true /* is_renderer_initiated */);
714 params.uses_post = uses_post; 715 params.uses_post = uses_post;
715 params.post_data = body; 716 params.post_data = body;
716 params.source_site_instance = source_site_instance; 717 params.source_site_instance = source_site_instance;
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
1208 if (pending_entry != controller_->GetVisibleEntry() || 1209 if (pending_entry != controller_->GetVisibleEntry() ||
1209 !should_preserve_entry) { 1210 !should_preserve_entry) {
1210 controller_->DiscardPendingEntry(true); 1211 controller_->DiscardPendingEntry(true);
1211 1212
1212 // Also force the UI to refresh. 1213 // Also force the UI to refresh.
1213 controller_->delegate()->NotifyNavigationStateChanged(INVALIDATE_TYPE_URL); 1214 controller_->delegate()->NotifyNavigationStateChanged(INVALIDATE_TYPE_URL);
1214 } 1215 }
1215 } 1216 }
1216 1217
1217 } // namespace content 1218 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698