| 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/public/browser/content_browser_client.h" | 5 #include "content/public/browser/content_browser_client.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/guid.h" | 10 #include "base/guid.h" |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 bool ContentBrowserClient::CanCommitURL(RenderProcessHost* process_host, | 84 bool ContentBrowserClient::CanCommitURL(RenderProcessHost* process_host, |
| 85 const GURL& site_url) { | 85 const GURL& site_url) { |
| 86 return true; | 86 return true; |
| 87 } | 87 } |
| 88 | 88 |
| 89 bool ContentBrowserClient::ShouldAllowOpenURL(SiteInstance* site_instance, | 89 bool ContentBrowserClient::ShouldAllowOpenURL(SiteInstance* site_instance, |
| 90 const GURL& url) { | 90 const GURL& url) { |
| 91 return true; | 91 return true; |
| 92 } | 92 } |
| 93 | 93 |
| 94 bool ContentBrowserClient:: | 94 bool ContentBrowserClient::ShouldIsolateFrameForTopDocumentIsolation( |
| 95 ShouldFrameShareParentSiteInstanceDespiteTopDocumentIsolation( | 95 NavigationHandle* navigation_handle, |
| 96 const GURL& url, | 96 SiteInstance* main_frame_site_instance) { |
| 97 SiteInstance* parent_site_instance) { | 97 // In absence of customizations above //content layer, TDI mode should isolate |
| 98 return false; | 98 // all cross-site frames. Additionally, isolating all cross-site frames makes |
| 99 // it easier to test TopDocumentIsolation in content_browsertests. |
| 100 return true; |
| 99 } | 101 } |
| 100 | 102 |
| 101 bool ContentBrowserClient::IsSuitableHost(RenderProcessHost* process_host, | 103 bool ContentBrowserClient::IsSuitableHost(RenderProcessHost* process_host, |
| 102 const GURL& site_url) { | 104 const GURL& site_url) { |
| 103 return true; | 105 return true; |
| 104 } | 106 } |
| 105 | 107 |
| 106 bool ContentBrowserClient::MayReuseHost(RenderProcessHost* process_host) { | 108 bool ContentBrowserClient::MayReuseHost(RenderProcessHost* process_host) { |
| 107 return true; | 109 return true; |
| 108 } | 110 } |
| (...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 471 return nullptr; | 473 return nullptr; |
| 472 } | 474 } |
| 473 | 475 |
| 474 std::vector<std::unique_ptr<URLLoaderThrottle>> | 476 std::vector<std::unique_ptr<URLLoaderThrottle>> |
| 475 ContentBrowserClient::CreateURLLoaderThrottles( | 477 ContentBrowserClient::CreateURLLoaderThrottles( |
| 476 const base::Callback<WebContents*()>& wc_getter) { | 478 const base::Callback<WebContents*()>& wc_getter) { |
| 477 return std::vector<std::unique_ptr<URLLoaderThrottle>>(); | 479 return std::vector<std::unique_ptr<URLLoaderThrottle>>(); |
| 478 } | 480 } |
| 479 | 481 |
| 480 } // namespace content | 482 } // namespace content |
| OLD | NEW |