OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/renderer_host/render_view_host_impl.h" | 5 #include "content/browser/renderer_host/render_view_host_impl.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 | 299 |
300 void RenderViewHostImpl::SyncRendererPrefs() { | 300 void RenderViewHostImpl::SyncRendererPrefs() { |
301 Send(new ViewMsg_SetRendererPrefs(GetRoutingID(), | 301 Send(new ViewMsg_SetRendererPrefs(GetRoutingID(), |
302 delegate_->GetRendererPrefs( | 302 delegate_->GetRendererPrefs( |
303 GetProcess()->GetBrowserContext()))); | 303 GetProcess()->GetBrowserContext()))); |
304 } | 304 } |
305 | 305 |
306 void RenderViewHostImpl::Navigate(const ViewMsg_Navigate_Params& params) { | 306 void RenderViewHostImpl::Navigate(const ViewMsg_Navigate_Params& params) { |
307 ChildProcessSecurityPolicyImpl::GetInstance()->GrantRequestURL( | 307 ChildProcessSecurityPolicyImpl::GetInstance()->GrantRequestURL( |
308 GetProcess()->GetID(), params.url); | 308 GetProcess()->GetID(), params.url); |
| 309 if (!params.base_url.is_empty()) { |
| 310 ChildProcessSecurityPolicyImpl::GetInstance()->GrantRequestURL( |
| 311 GetProcess()->GetID(), params.base_url); |
| 312 } |
309 | 313 |
310 ViewMsg_Navigate* nav_message = new ViewMsg_Navigate(GetRoutingID(), params); | 314 ViewMsg_Navigate* nav_message = new ViewMsg_Navigate(GetRoutingID(), params); |
311 | 315 |
312 // Only send the message if we aren't suspended at the start of a cross-site | 316 // Only send the message if we aren't suspended at the start of a cross-site |
313 // request. | 317 // request. |
314 if (navigations_suspended_) { | 318 if (navigations_suspended_) { |
315 // Shouldn't be possible to have a second navigation while suspended, since | 319 // Shouldn't be possible to have a second navigation while suspended, since |
316 // navigations will only be suspended during a cross-site request. If a | 320 // navigations will only be suspended during a cross-site request. If a |
317 // second navigation occurs, WebContentsImpl will cancel this pending RVH | 321 // second navigation occurs, WebContentsImpl will cancel this pending RVH |
318 // create a new pending RVH. | 322 // create a new pending RVH. |
(...skipping 1528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1847 // can cause navigations to be ignored in OnMsgNavigate. | 1851 // can cause navigations to be ignored in OnMsgNavigate. |
1848 is_waiting_for_beforeunload_ack_ = false; | 1852 is_waiting_for_beforeunload_ack_ = false; |
1849 is_waiting_for_unload_ack_ = false; | 1853 is_waiting_for_unload_ack_ = false; |
1850 } | 1854 } |
1851 | 1855 |
1852 void RenderViewHostImpl::ClearPowerSaveBlockers() { | 1856 void RenderViewHostImpl::ClearPowerSaveBlockers() { |
1853 STLDeleteValues(&power_save_blockers_); | 1857 STLDeleteValues(&power_save_blockers_); |
1854 } | 1858 } |
1855 | 1859 |
1856 } // namespace content | 1860 } // namespace content |
OLD | NEW |