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 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 | 288 |
289 void RenderViewHostImpl::SyncRendererPrefs() { | 289 void RenderViewHostImpl::SyncRendererPrefs() { |
290 Send(new ViewMsg_SetRendererPrefs(GetRoutingID(), | 290 Send(new ViewMsg_SetRendererPrefs(GetRoutingID(), |
291 delegate_->GetRendererPrefs( | 291 delegate_->GetRendererPrefs( |
292 GetProcess()->GetBrowserContext()))); | 292 GetProcess()->GetBrowserContext()))); |
293 } | 293 } |
294 | 294 |
295 void RenderViewHostImpl::Navigate(const ViewMsg_Navigate_Params& params) { | 295 void RenderViewHostImpl::Navigate(const ViewMsg_Navigate_Params& params) { |
296 ChildProcessSecurityPolicyImpl::GetInstance()->GrantRequestURL( | 296 ChildProcessSecurityPolicyImpl::GetInstance()->GrantRequestURL( |
297 GetProcess()->GetID(), params.url); | 297 GetProcess()->GetID(), params.url); |
| 298 if (!params.base_url.is_empty()) { |
| 299 ChildProcessSecurityPolicyImpl::GetInstance()->GrantRequestURL( |
| 300 GetProcess()->GetID(), params.base_url); |
| 301 } |
298 | 302 |
299 ViewMsg_Navigate* nav_message = new ViewMsg_Navigate(GetRoutingID(), params); | 303 ViewMsg_Navigate* nav_message = new ViewMsg_Navigate(GetRoutingID(), params); |
300 | 304 |
301 // Only send the message if we aren't suspended at the start of a cross-site | 305 // Only send the message if we aren't suspended at the start of a cross-site |
302 // request. | 306 // request. |
303 if (navigations_suspended_) { | 307 if (navigations_suspended_) { |
304 // Shouldn't be possible to have a second navigation while suspended, since | 308 // Shouldn't be possible to have a second navigation while suspended, since |
305 // navigations will only be suspended during a cross-site request. If a | 309 // navigations will only be suspended during a cross-site request. If a |
306 // second navigation occurs, WebContentsImpl will cancel this pending RVH | 310 // second navigation occurs, WebContentsImpl will cancel this pending RVH |
307 // create a new pending RVH. | 311 // create a new pending RVH. |
(...skipping 1527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1835 // can cause navigations to be ignored in OnMsgNavigate. | 1839 // can cause navigations to be ignored in OnMsgNavigate. |
1836 is_waiting_for_beforeunload_ack_ = false; | 1840 is_waiting_for_beforeunload_ack_ = false; |
1837 is_waiting_for_unload_ack_ = false; | 1841 is_waiting_for_unload_ack_ = false; |
1838 } | 1842 } |
1839 | 1843 |
1840 void RenderViewHostImpl::ClearPowerSaveBlockers() { | 1844 void RenderViewHostImpl::ClearPowerSaveBlockers() { |
1841 STLDeleteValues(&power_save_blockers_); | 1845 STLDeleteValues(&power_save_blockers_); |
1842 } | 1846 } |
1843 | 1847 |
1844 } // namespace content | 1848 } // namespace content |
OLD | NEW |