| Index: content/browser/frame_host/navigation_handle_impl.cc
|
| diff --git a/content/browser/frame_host/navigation_handle_impl.cc b/content/browser/frame_host/navigation_handle_impl.cc
|
| index 9dfe16c5340b02cfab9f7eb592c63c7b5c7d06f6..477a2b0bf79f238c255d57d6b78006284a8b2554 100644
|
| --- a/content/browser/frame_host/navigation_handle_impl.cc
|
| +++ b/content/browser/frame_host/navigation_handle_impl.cc
|
| @@ -33,14 +33,18 @@ void UpdateThrottleCheckResult(
|
| scoped_ptr<NavigationHandleImpl> NavigationHandleImpl::Create(
|
| const GURL& url,
|
| FrameTreeNode* frame_tree_node,
|
| + bool is_synchronous,
|
| + bool is_srcdoc,
|
| const base::TimeTicks& navigation_start) {
|
| - return scoped_ptr<NavigationHandleImpl>(
|
| - new NavigationHandleImpl(url, frame_tree_node, navigation_start));
|
| + return scoped_ptr<NavigationHandleImpl>(new NavigationHandleImpl(
|
| + url, frame_tree_node, is_synchronous, is_srcdoc, navigation_start));
|
| }
|
|
|
| NavigationHandleImpl::NavigationHandleImpl(
|
| const GURL& url,
|
| FrameTreeNode* frame_tree_node,
|
| + bool is_synchronous,
|
| + bool is_srcdoc,
|
| const base::TimeTicks& navigation_start)
|
| : url_(url),
|
| is_post_(false),
|
| @@ -50,6 +54,9 @@ NavigationHandleImpl::NavigationHandleImpl(
|
| net_error_code_(net::OK),
|
| render_frame_host_(nullptr),
|
| is_same_page_(false),
|
| + is_synchronous_(is_synchronous),
|
| + is_srcdoc_(is_srcdoc),
|
| + was_redirected_(false),
|
| state_(INITIAL),
|
| is_transferring_(false),
|
| frame_tree_node_(frame_tree_node),
|
| @@ -80,6 +87,36 @@ bool NavigationHandleImpl::IsInMainFrame() {
|
| return frame_tree_node_->IsMainFrame();
|
| }
|
|
|
| +bool NavigationHandleImpl::IsParentMainFrame() {
|
| + if (frame_tree_node_->parent())
|
| + return frame_tree_node_->parent()->IsMainFrame();
|
| +
|
| + return false;
|
| +}
|
| +
|
| +bool NavigationHandleImpl::IsSynchronousNavigation() {
|
| + return is_synchronous_;
|
| +}
|
| +
|
| +bool NavigationHandleImpl::IsSrcdoc() {
|
| + return is_srcdoc_;
|
| +}
|
| +
|
| +bool NavigationHandleImpl::WasServerRedirect() {
|
| + return was_redirected_;
|
| +}
|
| +
|
| +int NavigationHandleImpl::GetFrameTreeNodeId() {
|
| + return frame_tree_node_->frame_tree_node_id();
|
| +}
|
| +
|
| +int NavigationHandleImpl::GetParentFrameTreeNodeId() {
|
| + if (frame_tree_node_->IsMainFrame())
|
| + return FrameTreeNode::kFrameTreeNodeInvalidId;
|
| +
|
| + return frame_tree_node_->parent()->frame_tree_node_id();
|
| +}
|
| +
|
| const base::TimeTicks& NavigationHandleImpl::NavigationStart() {
|
| return navigation_start_;
|
| }
|
| @@ -268,6 +305,7 @@ void NavigationHandleImpl::WillRedirectRequest(
|
| sanitized_referrer_ = Referrer::SanitizeForRequest(url_, sanitized_referrer_);
|
| is_external_protocol_ = new_is_external_protocol;
|
| response_headers_ = response_headers;
|
| + was_redirected_ = true;
|
|
|
| state_ = WILL_REDIRECT_REQUEST;
|
| complete_callback_ = callback;
|
|
|