| 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 547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 558 } | 558 } |
| 559 | 559 |
| 560 void RenderViewHostImpl::Navigate(const ViewMsg_Navigate_Params& params) { | 560 void RenderViewHostImpl::Navigate(const ViewMsg_Navigate_Params& params) { |
| 561 TRACE_EVENT0("renderer_host", "RenderViewHostImpl::Navigate"); | 561 TRACE_EVENT0("renderer_host", "RenderViewHostImpl::Navigate"); |
| 562 // Browser plugin guests are not allowed to navigate outside web-safe schemes, | 562 // Browser plugin guests are not allowed to navigate outside web-safe schemes, |
| 563 // so do not grant them the ability to request additional URLs. | 563 // so do not grant them the ability to request additional URLs. |
| 564 if (!GetProcess()->IsGuest()) { | 564 if (!GetProcess()->IsGuest()) { |
| 565 ChildProcessSecurityPolicyImpl::GetInstance()->GrantRequestURL( | 565 ChildProcessSecurityPolicyImpl::GetInstance()->GrantRequestURL( |
| 566 GetProcess()->GetID(), params.url); | 566 GetProcess()->GetID(), params.url); |
| 567 if (params.url.SchemeIs(chrome::kDataScheme) && | 567 if (params.url.SchemeIs(chrome::kDataScheme) && |
| 568 params.base_url_for_data_url.SchemeIs(chrome::kFileScheme)) { | 568 params.base_url_for_data_url.SchemeIs(kFileScheme)) { |
| 569 // If 'data:' is used, and we have a 'file:' base url, grant access to | 569 // If 'data:' is used, and we have a 'file:' base url, grant access to |
| 570 // local files. | 570 // local files. |
| 571 ChildProcessSecurityPolicyImpl::GetInstance()->GrantRequestURL( | 571 ChildProcessSecurityPolicyImpl::GetInstance()->GrantRequestURL( |
| 572 GetProcess()->GetID(), params.base_url_for_data_url); | 572 GetProcess()->GetID(), params.base_url_for_data_url); |
| 573 } | 573 } |
| 574 } | 574 } |
| 575 | 575 |
| 576 // Only send the message if we aren't suspended at the start of a cross-site | 576 // Only send the message if we aren't suspended at the start of a cross-site |
| 577 // request. | 577 // request. |
| 578 if (navigations_suspended_) { | 578 if (navigations_suspended_) { |
| (...skipping 1684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2263 void RenderViewHostImpl::AttachToFrameTree() { | 2263 void RenderViewHostImpl::AttachToFrameTree() { |
| 2264 FrameTree* frame_tree = delegate_->GetFrameTree(); | 2264 FrameTree* frame_tree = delegate_->GetFrameTree(); |
| 2265 | 2265 |
| 2266 frame_tree->ResetForMainFrameSwap(); | 2266 frame_tree->ResetForMainFrameSwap(); |
| 2267 if (main_frame_id() != FrameTreeNode::kInvalidFrameId) { | 2267 if (main_frame_id() != FrameTreeNode::kInvalidFrameId) { |
| 2268 frame_tree->OnFirstNavigationAfterSwap(main_frame_id()); | 2268 frame_tree->OnFirstNavigationAfterSwap(main_frame_id()); |
| 2269 } | 2269 } |
| 2270 } | 2270 } |
| 2271 | 2271 |
| 2272 } // namespace content | 2272 } // namespace content |
| OLD | NEW |