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> |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 // protocol handlers. | 224 // protocol handlers. |
225 virtual bool IsHandledURL(const GURL& url); | 225 virtual bool IsHandledURL(const GURL& url); |
226 | 226 |
227 // Returns whether the given process is allowed to commit |url|. This is a | 227 // Returns whether the given process is allowed to commit |url|. This is a |
228 // more conservative check than IsSuitableHost, since it is used after a | 228 // more conservative check than IsSuitableHost, since it is used after a |
229 // navigation has committed to ensure that the process did not exceed its | 229 // navigation has committed to ensure that the process did not exceed its |
230 // authority. | 230 // authority. |
231 // This is called on the UI thread. | 231 // This is called on the UI thread. |
232 virtual bool CanCommitURL(RenderProcessHost* process_host, const GURL& url); | 232 virtual bool CanCommitURL(RenderProcessHost* process_host, const GURL& url); |
233 | 233 |
234 // Returns true if no URL within |origin| is allowed to commit in the given | |
235 // process. Must return false if there exists at least one URL in |origin| | |
236 // that is allowed to commit. | |
237 // This is called on the IO thread. | |
238 virtual bool IsIllegalOrigin(ResourceContext* resource_context, | |
239 int child_process_id, | |
240 const GURL& origin); | |
241 | |
242 // Returns whether a URL should be allowed to open from a specific context. | 234 // Returns whether a URL should be allowed to open from a specific context. |
243 // This also applies in cases where the new URL will open in another process. | 235 // This also applies in cases where the new URL will open in another process. |
244 virtual bool ShouldAllowOpenURL(SiteInstance* site_instance, const GURL& url); | 236 virtual bool ShouldAllowOpenURL(SiteInstance* site_instance, const GURL& url); |
245 | 237 |
246 // Allows the embedder to override OpenURLParams. | 238 // Allows the embedder to override OpenURLParams. |
247 virtual void OverrideOpenURLParams(SiteInstance* site_instance, | 239 virtual void OverrideOpenURLParams(SiteInstance* site_instance, |
248 OpenURLParams* params) {} | 240 OpenURLParams* params) {} |
249 | 241 |
250 // Returns whether a new view for a given |site_url| can be launched in a | 242 // Returns whether a new view for a given |site_url| can be launched in a |
251 // given |process_host|. | 243 // given |process_host|. |
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
778 // Allows an embedder to provide its own ExternalVideoSurfaceContainer | 770 // Allows an embedder to provide its own ExternalVideoSurfaceContainer |
779 // implementation. Return nullptr to disable external surface video. | 771 // implementation. Return nullptr to disable external surface video. |
780 virtual ExternalVideoSurfaceContainer* | 772 virtual ExternalVideoSurfaceContainer* |
781 OverrideCreateExternalVideoSurfaceContainer(WebContents* web_contents); | 773 OverrideCreateExternalVideoSurfaceContainer(WebContents* web_contents); |
782 #endif | 774 #endif |
783 }; | 775 }; |
784 | 776 |
785 } // namespace content | 777 } // namespace content |
786 | 778 |
787 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ | 779 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ |
OLD | NEW |