OLD | NEW |
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 <iterator> | 7 #include <iterator> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "content/browser/appcache/appcache_navigation_handle.h" | 10 #include "content/browser/appcache/appcache_navigation_handle.h" |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 return frame_tree_node_->frame_tree_node_id(); | 230 return frame_tree_node_->frame_tree_node_id(); |
231 } | 231 } |
232 | 232 |
233 int NavigationHandleImpl::GetParentFrameTreeNodeId() { | 233 int NavigationHandleImpl::GetParentFrameTreeNodeId() { |
234 if (frame_tree_node_->IsMainFrame()) | 234 if (frame_tree_node_->IsMainFrame()) |
235 return FrameTreeNode::kFrameTreeNodeInvalidId; | 235 return FrameTreeNode::kFrameTreeNodeInvalidId; |
236 | 236 |
237 return frame_tree_node_->parent()->frame_tree_node_id(); | 237 return frame_tree_node_->parent()->frame_tree_node_id(); |
238 } | 238 } |
239 | 239 |
| 240 RenderFrameHostImpl* NavigationHandleImpl::GetParentFrame() { |
| 241 if (frame_tree_node_->IsMainFrame()) |
| 242 return nullptr; |
| 243 |
| 244 return frame_tree_node_->parent()->current_frame_host(); |
| 245 } |
| 246 |
240 const base::TimeTicks& NavigationHandleImpl::NavigationStart() { | 247 const base::TimeTicks& NavigationHandleImpl::NavigationStart() { |
241 return navigation_start_; | 248 return navigation_start_; |
242 } | 249 } |
243 | 250 |
244 bool NavigationHandleImpl::IsPost() { | 251 bool NavigationHandleImpl::IsPost() { |
245 CHECK_NE(INITIAL, state_) | 252 CHECK_NE(INITIAL, state_) |
246 << "This accessor should not be called before the request is started."; | 253 << "This accessor should not be called before the request is started."; |
247 return method_ == "POST"; | 254 return method_ == "POST"; |
248 } | 255 } |
249 | 256 |
(...skipping 797 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1047 if (node->current_url().EqualsIgnoringRef(url_)) { | 1054 if (node->current_url().EqualsIgnoringRef(url_)) { |
1048 if (found_self_reference) | 1055 if (found_self_reference) |
1049 return true; | 1056 return true; |
1050 found_self_reference = true; | 1057 found_self_reference = true; |
1051 } | 1058 } |
1052 } | 1059 } |
1053 return false; | 1060 return false; |
1054 } | 1061 } |
1055 | 1062 |
1056 } // namespace content | 1063 } // namespace content |
OLD | NEW |