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

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

Issue 2541063002: Revert of Remove about:srcdoc url conversion. (Closed)
Patch Set: Created 4 years 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/navigation_handle_impl.h" 5 #include "content/browser/frame_host/navigation_handle_impl.h"
6 6
7 #include "base/debug/dump_without_crashing.h" 7 #include "base/debug/dump_without_crashing.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "content/browser/browsing_data/clear_site_data_throttle.h" 9 #include "content/browser/browsing_data/clear_site_data_throttle.h"
10 #include "content/browser/child_process_security_policy_impl.h" 10 #include "content/browser/child_process_security_policy_impl.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 } 46 }
47 47
48 } // namespace 48 } // namespace
49 49
50 // static 50 // static
51 std::unique_ptr<NavigationHandleImpl> NavigationHandleImpl::Create( 51 std::unique_ptr<NavigationHandleImpl> NavigationHandleImpl::Create(
52 const GURL& url, 52 const GURL& url,
53 FrameTreeNode* frame_tree_node, 53 FrameTreeNode* frame_tree_node,
54 bool is_renderer_initiated, 54 bool is_renderer_initiated,
55 bool is_same_page, 55 bool is_same_page,
56 bool is_srcdoc,
56 const base::TimeTicks& navigation_start, 57 const base::TimeTicks& navigation_start,
57 int pending_nav_entry_id, 58 int pending_nav_entry_id,
58 bool started_from_context_menu) { 59 bool started_from_context_menu) {
59 return std::unique_ptr<NavigationHandleImpl>(new NavigationHandleImpl( 60 return std::unique_ptr<NavigationHandleImpl>(new NavigationHandleImpl(
60 url, frame_tree_node, is_renderer_initiated, is_same_page, 61 url, frame_tree_node, is_renderer_initiated, is_same_page, is_srcdoc,
61 navigation_start, pending_nav_entry_id, started_from_context_menu)); 62 navigation_start, pending_nav_entry_id, started_from_context_menu));
62 } 63 }
63 64
64 NavigationHandleImpl::NavigationHandleImpl( 65 NavigationHandleImpl::NavigationHandleImpl(
65 const GURL& url, 66 const GURL& url,
66 FrameTreeNode* frame_tree_node, 67 FrameTreeNode* frame_tree_node,
67 bool is_renderer_initiated, 68 bool is_renderer_initiated,
68 bool is_same_page, 69 bool is_same_page,
70 bool is_srcdoc,
69 const base::TimeTicks& navigation_start, 71 const base::TimeTicks& navigation_start,
70 int pending_nav_entry_id, 72 int pending_nav_entry_id,
71 bool started_from_context_menu) 73 bool started_from_context_menu)
72 : url_(url), 74 : url_(url),
73 has_user_gesture_(false), 75 has_user_gesture_(false),
74 transition_(ui::PAGE_TRANSITION_LINK), 76 transition_(ui::PAGE_TRANSITION_LINK),
75 is_external_protocol_(false), 77 is_external_protocol_(false),
76 net_error_code_(net::OK), 78 net_error_code_(net::OK),
77 render_frame_host_(nullptr), 79 render_frame_host_(nullptr),
78 is_renderer_initiated_(is_renderer_initiated), 80 is_renderer_initiated_(is_renderer_initiated),
79 is_same_page_(is_same_page), 81 is_same_page_(is_same_page),
82 is_srcdoc_(is_srcdoc),
80 was_redirected_(false), 83 was_redirected_(false),
81 connection_info_(net::HttpResponseInfo::CONNECTION_INFO_UNKNOWN), 84 connection_info_(net::HttpResponseInfo::CONNECTION_INFO_UNKNOWN),
82 original_url_(url), 85 original_url_(url),
83 state_(INITIAL), 86 state_(INITIAL),
84 is_transferring_(false), 87 is_transferring_(false),
85 frame_tree_node_(frame_tree_node), 88 frame_tree_node_(frame_tree_node),
86 next_index_(0), 89 next_index_(0),
87 navigation_start_(navigation_start), 90 navigation_start_(navigation_start),
88 pending_nav_entry_id_(pending_nav_entry_id), 91 pending_nav_entry_id_(pending_nav_entry_id),
89 request_context_type_(REQUEST_CONTEXT_TYPE_UNSPECIFIED), 92 request_context_type_(REQUEST_CONTEXT_TYPE_UNSPECIFIED),
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 if (frame_tree_node_->parent()) 161 if (frame_tree_node_->parent())
159 return frame_tree_node_->parent()->IsMainFrame(); 162 return frame_tree_node_->parent()->IsMainFrame();
160 163
161 return false; 164 return false;
162 } 165 }
163 166
164 bool NavigationHandleImpl::IsRendererInitiated() { 167 bool NavigationHandleImpl::IsRendererInitiated() {
165 return is_renderer_initiated_; 168 return is_renderer_initiated_;
166 } 169 }
167 170
171 bool NavigationHandleImpl::IsSrcdoc() {
172 return is_srcdoc_;
173 }
174
168 bool NavigationHandleImpl::WasServerRedirect() { 175 bool NavigationHandleImpl::WasServerRedirect() {
169 return was_redirected_; 176 return was_redirected_;
170 } 177 }
171 178
172 int NavigationHandleImpl::GetFrameTreeNodeId() { 179 int NavigationHandleImpl::GetFrameTreeNodeId() {
173 return frame_tree_node_->frame_tree_node_id(); 180 return frame_tree_node_->frame_tree_node_id();
174 } 181 }
175 182
176 int NavigationHandleImpl::GetParentFrameTreeNodeId() { 183 int NavigationHandleImpl::GetParentFrameTreeNodeId() {
177 if (frame_tree_node_->IsMainFrame()) 184 if (frame_tree_node_->IsMainFrame())
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after
777 throttles_to_register.push_back(std::move(clear_site_data_throttle)); 784 throttles_to_register.push_back(std::move(clear_site_data_throttle));
778 785
779 if (throttles_to_register.size() > 0) { 786 if (throttles_to_register.size() > 0) {
780 throttles_.insert(throttles_.begin(), throttles_to_register.begin(), 787 throttles_.insert(throttles_.begin(), throttles_to_register.begin(),
781 throttles_to_register.end()); 788 throttles_to_register.end());
782 throttles_to_register.weak_clear(); 789 throttles_to_register.weak_clear();
783 } 790 }
784 } 791 }
785 792
786 } // namespace content 793 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/navigation_handle_impl.h ('k') | content/browser/frame_host/navigation_handle_impl_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698