OLD | NEW |
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 "base/command_line.h" | 7 #include "base/command_line.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/frame_tree_node.h" | 9 #include "content/browser/frame_host/frame_tree_node.h" |
10 #include "content/browser/frame_host/navigation_controller_impl.h" | 10 #include "content/browser/frame_host/navigation_controller_impl.h" |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 } // namespace | 130 } // namespace |
131 | 131 |
132 | 132 |
133 NavigatorImpl::NavigatorImpl( | 133 NavigatorImpl::NavigatorImpl( |
134 NavigationControllerImpl* navigation_controller, | 134 NavigationControllerImpl* navigation_controller, |
135 NavigatorDelegate* delegate) | 135 NavigatorDelegate* delegate) |
136 : controller_(navigation_controller), | 136 : controller_(navigation_controller), |
137 delegate_(delegate) { | 137 delegate_(delegate) { |
138 } | 138 } |
139 | 139 |
| 140 NavigationController* NavigatorImpl::GetController() { |
| 141 return controller_; |
| 142 } |
| 143 |
140 void NavigatorImpl::DidStartProvisionalLoad( | 144 void NavigatorImpl::DidStartProvisionalLoad( |
141 RenderFrameHostImpl* render_frame_host, | 145 RenderFrameHostImpl* render_frame_host, |
142 int parent_routing_id, | 146 int parent_routing_id, |
143 const GURL& url) { | 147 const GURL& url) { |
144 bool is_error_page = (url.spec() == kUnreachableWebDataURL); | 148 bool is_error_page = (url.spec() == kUnreachableWebDataURL); |
145 bool is_iframe_srcdoc = (url.spec() == kAboutSrcDocURL); | 149 bool is_iframe_srcdoc = (url.spec() == kAboutSrcDocURL); |
146 GURL validated_url(url); | 150 GURL validated_url(url); |
147 RenderProcessHost* render_process_host = render_frame_host->GetProcess(); | 151 RenderProcessHost* render_process_host = render_frame_host->GetProcess(); |
148 render_process_host->FilterURL(false, &validated_url); | 152 render_process_host->FilterURL(false, &validated_url); |
149 | 153 |
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
610 | 614 |
611 // Navigations in Web UI pages count as browser-initiated navigations. | 615 // Navigations in Web UI pages count as browser-initiated navigations. |
612 params.is_renderer_initiated = false; | 616 params.is_renderer_initiated = false; |
613 } | 617 } |
614 | 618 |
615 if (delegate_) | 619 if (delegate_) |
616 delegate_->RequestOpenURL(render_frame_host, params); | 620 delegate_->RequestOpenURL(render_frame_host, params); |
617 } | 621 } |
618 | 622 |
619 } // namespace content | 623 } // namespace content |
OLD | NEW |