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/render_frame_host_impl.h" | 5 #include "content/browser/frame_host/render_frame_host_impl.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/containers/hash_tables.h" | 8 #include "base/containers/hash_tables.h" |
9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
10 #include "base/metrics/user_metrics_action.h" | 10 #include "base/metrics/user_metrics_action.h" |
(...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
735 // cross-site URLs that are not allowed to commit in this process. | 735 // cross-site URLs that are not allowed to commit in this process. |
736 | 736 |
737 // Give the client a chance to disallow URLs from committing. | 737 // Give the client a chance to disallow URLs from committing. |
738 return GetContentClient()->browser()->CanCommitURL(GetProcess(), url); | 738 return GetContentClient()->browser()->CanCommitURL(GetProcess(), url); |
739 } | 739 } |
740 | 740 |
741 void RenderFrameHostImpl::Navigate(const FrameMsg_Navigate_Params& params) { | 741 void RenderFrameHostImpl::Navigate(const FrameMsg_Navigate_Params& params) { |
742 TRACE_EVENT0("frame_host", "RenderFrameHostImpl::Navigate"); | 742 TRACE_EVENT0("frame_host", "RenderFrameHostImpl::Navigate"); |
743 // Browser plugin guests are not allowed to navigate outside web-safe schemes, | 743 // Browser plugin guests are not allowed to navigate outside web-safe schemes, |
744 // so do not grant them the ability to request additional URLs. | 744 // so do not grant them the ability to request additional URLs. |
745 if (!GetProcess()->IsGuest()) { | 745 if (!GetProcess()->IsIsolatedGuest()) { |
746 ChildProcessSecurityPolicyImpl::GetInstance()->GrantRequestURL( | 746 ChildProcessSecurityPolicyImpl::GetInstance()->GrantRequestURL( |
747 GetProcess()->GetID(), params.url); | 747 GetProcess()->GetID(), params.url); |
748 if (params.url.SchemeIs(kDataScheme) && | 748 if (params.url.SchemeIs(kDataScheme) && |
749 params.base_url_for_data_url.SchemeIs(kFileScheme)) { | 749 params.base_url_for_data_url.SchemeIs(kFileScheme)) { |
750 // If 'data:' is used, and we have a 'file:' base url, grant access to | 750 // If 'data:' is used, and we have a 'file:' base url, grant access to |
751 // local files. | 751 // local files. |
752 ChildProcessSecurityPolicyImpl::GetInstance()->GrantRequestURL( | 752 ChildProcessSecurityPolicyImpl::GetInstance()->GrantRequestURL( |
753 GetProcess()->GetID(), params.base_url_for_data_url); | 753 GetProcess()->GetID(), params.base_url_for_data_url); |
754 } | 754 } |
755 } | 755 } |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
885 cancel_notification_callbacks_.erase(notification_id); | 885 cancel_notification_callbacks_.erase(notification_id); |
886 } | 886 } |
887 | 887 |
888 void RenderFrameHostImpl::DesktopNotificationPermissionRequestDone( | 888 void RenderFrameHostImpl::DesktopNotificationPermissionRequestDone( |
889 int callback_context) { | 889 int callback_context) { |
890 Send(new DesktopNotificationMsg_PermissionRequestDone( | 890 Send(new DesktopNotificationMsg_PermissionRequestDone( |
891 routing_id_, callback_context)); | 891 routing_id_, callback_context)); |
892 } | 892 } |
893 | 893 |
894 } // namespace content | 894 } // namespace content |
OLD | NEW |