Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(128)

Side by Side Diff: content/public/browser/content_browser_client.h

Issue 2987563004: Revert of Use FrameIsAd to decide whether to isolate a frame in TopDocumentIsolation mode. (Closed)
Patch Set: Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #ifndef CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_
6 #define CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ 6 #define CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <map> 10 #include <map>
11 #include <memory> 11 #include <memory>
12 #include <set>
13 #include <string> 12 #include <string>
14 #include <utility> 13 #include <utility>
15 #include <vector> 14 #include <vector>
16 15
17 #include "base/callback.h" 16 #include "base/callback.h"
18 #include "base/task_scheduler/task_scheduler.h" 17 #include "base/task_scheduler/task_scheduler.h"
19 #include "base/values.h" 18 #include "base/values.h"
20 #include "build/build_config.h" 19 #include "build/build_config.h"
21 #include "content/public/browser/certificate_request_result_type.h" 20 #include "content/public/browser/certificate_request_result_type.h"
22 #include "content/public/browser/navigation_throttle.h" 21 #include "content/public/browser/navigation_throttle.h"
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 // This also applies in cases where the new URL will open in another process. 254 // This also applies in cases where the new URL will open in another process.
256 virtual bool ShouldAllowOpenURL(SiteInstance* site_instance, const GURL& url); 255 virtual bool ShouldAllowOpenURL(SiteInstance* site_instance, const GURL& url);
257 256
258 // Allows the embedder to override parameters when navigating. Called for both 257 // Allows the embedder to override parameters when navigating. Called for both
259 // opening new URLs and when transferring URLs across processes. 258 // opening new URLs and when transferring URLs across processes.
260 virtual void OverrideNavigationParams(SiteInstance* site_instance, 259 virtual void OverrideNavigationParams(SiteInstance* site_instance,
261 ui::PageTransition* transition, 260 ui::PageTransition* transition,
262 bool* is_renderer_initiated, 261 bool* is_renderer_initiated,
263 content::Referrer* referrer) {} 262 content::Referrer* referrer) {}
264 263
265 // Called in TopDocumentIsolation mode to let the embedder decide whether the 264 // Allows the embedder to override top document isolation for specific frames.
266 // subframe navigation tracked by |navigation_handle| should end up isolated 265 // |url| is the URL being loaded in the subframe, and |parent_site_instance|
267 // from the main content. 266 // is the SiteInstance of the parent frame. Called only for subframes and only
268 // 267 // when top document isolation mode is enabled.
269 // The subframe navigation in question is always to a URL that is cross-site 268 virtual bool ShouldFrameShareParentSiteInstanceDespiteTopDocumentIsolation(
270 // from the top-level frame. |main_frame_site_instance| is the SiteInstance 269 const GURL& url,
271 // of the top-level frame. 270 SiteInstance* parent_site_instance);
272 virtual bool ShouldIsolateFrameForTopDocumentIsolation(
273 NavigationHandle* navigation_handle,
274 SiteInstance* main_frame_site_instance);
275 271
276 // Returns whether a new view for a given |site_url| can be launched in a 272 // Returns whether a new view for a given |site_url| can be launched in a
277 // given |process_host|. 273 // given |process_host|.
278 virtual bool IsSuitableHost(RenderProcessHost* process_host, 274 virtual bool IsSuitableHost(RenderProcessHost* process_host,
279 const GURL& site_url); 275 const GURL& site_url);
280 276
281 // Returns whether a new view for a new site instance can be added to a 277 // Returns whether a new view for a new site instance can be added to a
282 // given |process_host|. 278 // given |process_host|.
283 virtual bool MayReuseHost(RenderProcessHost* process_host); 279 virtual bool MayReuseHost(RenderProcessHost* process_host);
284 280
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after
827 // Allows the embedder to register one or more URLLoaderThrottles for a 823 // Allows the embedder to register one or more URLLoaderThrottles for a
828 // URL request. This is used only when --enable-network-service is in effect. 824 // URL request. This is used only when --enable-network-service is in effect.
829 // This is called on the IO thread. 825 // This is called on the IO thread.
830 virtual std::vector<std::unique_ptr<URLLoaderThrottle>> 826 virtual std::vector<std::unique_ptr<URLLoaderThrottle>>
831 CreateURLLoaderThrottles(const base::Callback<WebContents*()>& wc_getter); 827 CreateURLLoaderThrottles(const base::Callback<WebContents*()>& wc_getter);
832 }; 828 };
833 829
834 } // namespace content 830 } // namespace content
835 831
836 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ 832 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_
OLDNEW
« no previous file with comments | « content/browser/top_document_isolation_browsertest.cc ('k') | content/public/browser/content_browser_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698