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 <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 URLRequestInterceptorScopedVector request_interceptors); | 210 URLRequestInterceptorScopedVector request_interceptors); |
211 | 211 |
212 // Returns whether a specified URL is handled by the embedder's internal | 212 // Returns whether a specified URL is handled by the embedder's internal |
213 // protocol handlers. | 213 // protocol handlers. |
214 virtual bool IsHandledURL(const GURL& url); | 214 virtual bool IsHandledURL(const GURL& url); |
215 | 215 |
216 // Returns whether the given process is allowed to commit |url|. This is a | 216 // Returns whether the given process is allowed to commit |url|. This is a |
217 // more conservative check than IsSuitableHost, since it is used after a | 217 // more conservative check than IsSuitableHost, since it is used after a |
218 // navigation has committed to ensure that the process did not exceed its | 218 // navigation has committed to ensure that the process did not exceed its |
219 // authority. | 219 // authority. |
| 220 // This is called on the UI thread. |
220 virtual bool CanCommitURL(RenderProcessHost* process_host, const GURL& url); | 221 virtual bool CanCommitURL(RenderProcessHost* process_host, const GURL& url); |
221 | 222 |
| 223 // Returns true if no URL within |origin| is allowed to commit in the given |
| 224 // process. Must return false if there exists at least one URL in |origin| |
| 225 // that is allowed to commit. |
| 226 // This is called on the IO thread. |
| 227 virtual bool IsIllegalOrigin(ResourceContext* resource_context, |
| 228 int child_process_id, |
| 229 const GURL& origin); |
| 230 |
222 // Returns whether a URL should be allowed to open from a specific context. | 231 // Returns whether a URL should be allowed to open from a specific context. |
223 // This also applies in cases where the new URL will open in another process. | 232 // This also applies in cases where the new URL will open in another process. |
224 virtual bool ShouldAllowOpenURL(SiteInstance* site_instance, const GURL& url); | 233 virtual bool ShouldAllowOpenURL(SiteInstance* site_instance, const GURL& url); |
225 | 234 |
226 // Returns whether a new view for a given |site_url| can be launched in a | 235 // Returns whether a new view for a given |site_url| can be launched in a |
227 // given |process_host|. | 236 // given |process_host|. |
228 virtual bool IsSuitableHost(RenderProcessHost* process_host, | 237 virtual bool IsSuitableHost(RenderProcessHost* process_host, |
229 const GURL& site_url); | 238 const GURL& site_url); |
230 | 239 |
231 // Returns whether a new view for a new site instance can be added to a | 240 // Returns whether a new view for a new site instance can be added to a |
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
676 // Allows an embedder to provide its own ExternalVideoSurfaceContainer | 685 // Allows an embedder to provide its own ExternalVideoSurfaceContainer |
677 // implementation. Return nullptr to disable external surface video. | 686 // implementation. Return nullptr to disable external surface video. |
678 virtual ExternalVideoSurfaceContainer* | 687 virtual ExternalVideoSurfaceContainer* |
679 OverrideCreateExternalVideoSurfaceContainer(WebContents* web_contents); | 688 OverrideCreateExternalVideoSurfaceContainer(WebContents* web_contents); |
680 #endif | 689 #endif |
681 }; | 690 }; |
682 | 691 |
683 } // namespace content | 692 } // namespace content |
684 | 693 |
685 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ | 694 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ |
OLD | NEW |