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

Side by Side Diff: content/test/test_render_frame_host.cc

Issue 2046293002: Implement DelegationTracker for tracking delegated permissions to RenderFrameHosts (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@permission-delegation-2-blink
Patch Set: Implement DelegationTracker for tracking delegated permissions to RenderFrameHosts 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
« no previous file with comments | « chrome/chrome_tests_unit.gypi ('k') | no next file » | 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/test/test_render_frame_host.h" 5 #include "content/test/test_render_frame_host.h"
6 6
7 #include "base/guid.h" 7 #include "base/guid.h"
8 #include "content/browser/frame_host/frame_tree.h" 8 #include "content/browser/frame_host/frame_tree.h"
9 #include "content/browser/frame_host/navigation_handle_impl.h" 9 #include "content/browser/frame_host/navigation_handle_impl.h"
10 #include "content/browser/frame_host/navigation_request.h" 10 #include "content/browser/frame_host/navigation_request.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 if (frame_tree_node()->navigation_request()) 125 if (frame_tree_node()->navigation_request())
126 PrepareForCommit(); 126 PrepareForCommit();
127 127
128 bool is_auto_subframe = 128 bool is_auto_subframe =
129 GetParent() && !frame_tree_node()->has_committed_real_load(); 129 GetParent() && !frame_tree_node()->has_committed_real_load();
130 130
131 FrameHostMsg_DidCommitProvisionalLoad_Params params; 131 FrameHostMsg_DidCommitProvisionalLoad_Params params;
132 params.page_id = ComputeNextPageID(); 132 params.page_id = ComputeNextPageID();
133 params.nav_entry_id = 0; 133 params.nav_entry_id = 0;
134 params.url = url; 134 params.url = url;
135 params.origin = url::Origin(url);
135 if (!GetParent()) 136 if (!GetParent())
136 params.transition = ui::PAGE_TRANSITION_LINK; 137 params.transition = ui::PAGE_TRANSITION_LINK;
137 else if (is_auto_subframe) 138 else if (is_auto_subframe)
138 params.transition = ui::PAGE_TRANSITION_AUTO_SUBFRAME; 139 params.transition = ui::PAGE_TRANSITION_AUTO_SUBFRAME;
139 else 140 else
140 params.transition = ui::PAGE_TRANSITION_MANUAL_SUBFRAME; 141 params.transition = ui::PAGE_TRANSITION_MANUAL_SUBFRAME;
141 params.should_update_history = true; 142 params.should_update_history = true;
142 params.did_create_new_entry = !is_auto_subframe; 143 params.did_create_new_entry = !is_auto_subframe;
143 params.gesture = NavigationGestureUser; 144 params.gesture = NavigationGestureUser;
144 params.contents_mime_type = contents_mime_type_; 145 params.contents_mime_type = contents_mime_type_;
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 // cleared during DidFailProvisionalLoad). 433 // cleared during DidFailProvisionalLoad).
433 int page_id = entry ? entry->GetPageID() : -1; 434 int page_id = entry ? entry->GetPageID() : -1;
434 if (page_id == -1) { 435 if (page_id == -1) {
435 WebContentsImpl* web_contents = static_cast<WebContentsImpl*>(delegate()); 436 WebContentsImpl* web_contents = static_cast<WebContentsImpl*>(delegate());
436 page_id = web_contents->GetMaxPageIDForSiteInstance(GetSiteInstance()) + 1; 437 page_id = web_contents->GetMaxPageIDForSiteInstance(GetSiteInstance()) + 1;
437 } 438 }
438 return page_id; 439 return page_id;
439 } 440 }
440 441
441 } // namespace content 442 } // namespace content
OLDNEW
« no previous file with comments | « chrome/chrome_tests_unit.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698