| 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 bool ContentBrowserClient::CanCommitURL(RenderProcessHost* process_host, | 85 bool ContentBrowserClient::CanCommitURL(RenderProcessHost* process_host, |
| 86 const GURL& site_url) { | 86 const GURL& site_url) { |
| 87 return true; | 87 return true; |
| 88 } | 88 } |
| 89 | 89 |
| 90 bool ContentBrowserClient::ShouldAllowOpenURL(SiteInstance* site_instance, | 90 bool ContentBrowserClient::ShouldAllowOpenURL(SiteInstance* site_instance, |
| 91 const GURL& url) { | 91 const GURL& url) { |
| 92 return true; | 92 return true; |
| 93 } | 93 } |
| 94 | 94 |
| 95 bool ContentBrowserClient:: | 95 bool ContentBrowserClient::ShouldIsolateFrameForTopDocumentIsolation( |
| 96 ShouldFrameShareParentSiteInstanceDespiteTopDocumentIsolation( | 96 NavigationHandle* navigation_handle, |
| 97 const GURL& url, | 97 SiteInstance* main_frame_site_instance) { |
| 98 SiteInstance* parent_site_instance) { | 98 // In absence of customizations above //content layer, TDI mode should isolate |
| 99 return false; | 99 // all cross-site frames. Additionally, isolating all cross-site frames makes |
| 100 // it easier to test TopDocumentIsolation in content_browsertests. |
| 101 return true; |
| 100 } | 102 } |
| 101 | 103 |
| 102 bool ContentBrowserClient::IsSuitableHost(RenderProcessHost* process_host, | 104 bool ContentBrowserClient::IsSuitableHost(RenderProcessHost* process_host, |
| 103 const GURL& site_url) { | 105 const GURL& site_url) { |
| 104 return true; | 106 return true; |
| 105 } | 107 } |
| 106 | 108 |
| 107 bool ContentBrowserClient::MayReuseHost(RenderProcessHost* process_host) { | 109 bool ContentBrowserClient::MayReuseHost(RenderProcessHost* process_host) { |
| 108 return true; | 110 return true; |
| 109 } | 111 } |
| (...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 477 return nullptr; | 479 return nullptr; |
| 478 } | 480 } |
| 479 | 481 |
| 480 std::vector<std::unique_ptr<URLLoaderThrottle>> | 482 std::vector<std::unique_ptr<URLLoaderThrottle>> |
| 481 ContentBrowserClient::CreateURLLoaderThrottles( | 483 ContentBrowserClient::CreateURLLoaderThrottles( |
| 482 const base::Callback<WebContents*()>& wc_getter) { | 484 const base::Callback<WebContents*()>& wc_getter) { |
| 483 return std::vector<std::unique_ptr<URLLoaderThrottle>>(); | 485 return std::vector<std::unique_ptr<URLLoaderThrottle>>(); |
| 484 } | 486 } |
| 485 | 487 |
| 486 } // namespace content | 488 } // namespace content |
| OLD | NEW |