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 #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> |
12 #include <string> | 13 #include <string> |
13 #include <utility> | 14 #include <utility> |
14 #include <vector> | 15 #include <vector> |
15 | 16 |
16 #include "base/callback.h" | 17 #include "base/callback.h" |
17 #include "base/task_scheduler/task_scheduler.h" | 18 #include "base/task_scheduler/task_scheduler.h" |
18 #include "base/values.h" | 19 #include "base/values.h" |
19 #include "build/build_config.h" | 20 #include "build/build_config.h" |
20 #include "content/public/browser/certificate_request_result_type.h" | 21 #include "content/public/browser/certificate_request_result_type.h" |
21 #include "content/public/browser/navigation_throttle.h" | 22 #include "content/public/browser/navigation_throttle.h" |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 // This also applies in cases where the new URL will open in another process. | 250 // This also applies in cases where the new URL will open in another process. |
250 virtual bool ShouldAllowOpenURL(SiteInstance* site_instance, const GURL& url); | 251 virtual bool ShouldAllowOpenURL(SiteInstance* site_instance, const GURL& url); |
251 | 252 |
252 // Allows the embedder to override parameters when navigating. Called for both | 253 // Allows the embedder to override parameters when navigating. Called for both |
253 // opening new URLs and when transferring URLs across processes. | 254 // opening new URLs and when transferring URLs across processes. |
254 virtual void OverrideNavigationParams(SiteInstance* site_instance, | 255 virtual void OverrideNavigationParams(SiteInstance* site_instance, |
255 ui::PageTransition* transition, | 256 ui::PageTransition* transition, |
256 bool* is_renderer_initiated, | 257 bool* is_renderer_initiated, |
257 content::Referrer* referrer) {} | 258 content::Referrer* referrer) {} |
258 | 259 |
259 // Allows the embedder to override top document isolation for specific frames. | 260 // Called in TopDocumentIsolation mode to let the embedder decide whether the |
260 // |url| is the URL being loaded in the subframe, and |parent_site_instance| | 261 // |frame| should be isolated from the main content (if the frame is navigated |
261 // is the SiteInstance of the parent frame. Called only for subframes and only | 262 // to |dest_url| that is cross-site from the top-level frame). |
262 // when top document isolation mode is enabled. | 263 // |main_frame_site_instance| is the SiteInstance of the top-level frame. |
263 virtual bool ShouldFrameShareParentSiteInstanceDespiteTopDocumentIsolation( | 264 virtual bool ShouldIsolateFrameForTopDocumentIsolation( |
264 const GURL& url, | 265 RenderFrameHost* frame, |
265 SiteInstance* parent_site_instance); | 266 const GURL& dest_url, |
| 267 SiteInstance* main_frame_site_instance); |
266 | 268 |
267 // Returns whether a new view for a given |site_url| can be launched in a | 269 // Returns whether a new view for a given |site_url| can be launched in a |
268 // given |process_host|. | 270 // given |process_host|. |
269 virtual bool IsSuitableHost(RenderProcessHost* process_host, | 271 virtual bool IsSuitableHost(RenderProcessHost* process_host, |
270 const GURL& site_url); | 272 const GURL& site_url); |
271 | 273 |
272 // Returns whether a new view for a new site instance can be added to a | 274 // Returns whether a new view for a new site instance can be added to a |
273 // given |process_host|. | 275 // given |process_host|. |
274 virtual bool MayReuseHost(RenderProcessHost* process_host); | 276 virtual bool MayReuseHost(RenderProcessHost* process_host); |
275 | 277 |
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
804 // Allows the embedder to register one or more URLLoaderThrottles for a | 806 // Allows the embedder to register one or more URLLoaderThrottles for a |
805 // URL request. This is used only when --enable-network-service is in effect. | 807 // URL request. This is used only when --enable-network-service is in effect. |
806 // This is called on the IO thread. | 808 // This is called on the IO thread. |
807 virtual std::vector<std::unique_ptr<URLLoaderThrottle>> | 809 virtual std::vector<std::unique_ptr<URLLoaderThrottle>> |
808 CreateURLLoaderThrottles(const base::Callback<WebContents*()>& wc_getter); | 810 CreateURLLoaderThrottles(const base::Callback<WebContents*()>& wc_getter); |
809 }; | 811 }; |
810 | 812 |
811 } // namespace content | 813 } // namespace content |
812 | 814 |
813 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ | 815 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ |
OLD | NEW |