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 <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/metrics/histogram_macros.h" | 10 #include "base/metrics/histogram_macros.h" |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 : controller_(navigation_controller), | 104 : controller_(navigation_controller), |
105 delegate_(delegate) { | 105 delegate_(delegate) { |
106 } | 106 } |
107 | 107 |
108 NavigatorImpl::~NavigatorImpl() {} | 108 NavigatorImpl::~NavigatorImpl() {} |
109 | 109 |
110 // static | 110 // static |
111 void NavigatorImpl::CheckWebUIRendererDoesNotDisplayNormalURL( | 111 void NavigatorImpl::CheckWebUIRendererDoesNotDisplayNormalURL( |
112 RenderFrameHostImpl* render_frame_host, | 112 RenderFrameHostImpl* render_frame_host, |
113 const GURL& url) { | 113 const GURL& url) { |
114 int enabled_bindings = | 114 int enabled_bindings = render_frame_host->GetEnabledBindings(); |
115 render_frame_host->render_view_host()->GetEnabledBindings(); | |
116 bool is_allowed_in_web_ui_renderer = | 115 bool is_allowed_in_web_ui_renderer = |
117 WebUIControllerFactoryRegistry::GetInstance()->IsURLAcceptableForWebUI( | 116 WebUIControllerFactoryRegistry::GetInstance()->IsURLAcceptableForWebUI( |
118 render_frame_host->frame_tree_node() | 117 render_frame_host->frame_tree_node() |
119 ->navigator() | 118 ->navigator() |
120 ->GetController() | 119 ->GetController() |
121 ->GetBrowserContext(), | 120 ->GetBrowserContext(), |
122 url); | 121 url); |
123 if ((enabled_bindings & BINDINGS_POLICY_WEB_UI) && | 122 if ((enabled_bindings & BINDINGS_POLICY_WEB_UI) && |
124 !is_allowed_in_web_ui_renderer) { | 123 !is_allowed_in_web_ui_renderer) { |
125 // Log the URL to help us diagnose any future failures of this CHECK. | 124 // Log the URL to help us diagnose any future failures of this CHECK. |
(...skipping 1142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1268 if (navigation_handle) | 1267 if (navigation_handle) |
1269 navigation_handle->update_entry_id_for_transfer(entry->GetUniqueID()); | 1268 navigation_handle->update_entry_id_for_transfer(entry->GetUniqueID()); |
1270 | 1269 |
1271 controller_->SetPendingEntry(std::move(entry)); | 1270 controller_->SetPendingEntry(std::move(entry)); |
1272 if (delegate_) | 1271 if (delegate_) |
1273 delegate_->NotifyChangedNavigationState(content::INVALIDATE_TYPE_URL); | 1272 delegate_->NotifyChangedNavigationState(content::INVALIDATE_TYPE_URL); |
1274 } | 1273 } |
1275 } | 1274 } |
1276 | 1275 |
1277 } // namespace content | 1276 } // namespace content |
OLD | NEW |