Chromium Code Reviews| 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 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 520 ResourceContext* context, | 512 ResourceContext* context, |
| 521 int render_process_id, | 513 int render_process_id, |
| 522 int opener_render_view_id, | 514 int opener_render_view_id, |
| 523 int opener_render_frame_id, | 515 int opener_render_frame_id, |
| 524 bool* no_javascript_access); | 516 bool* no_javascript_access); |
| 525 | 517 |
| 526 // Notifies the embedder that the ResourceDispatcherHost has been created. | 518 // Notifies the embedder that the ResourceDispatcherHost has been created. |
| 527 // This is when it can optionally add a delegate. | 519 // This is when it can optionally add a delegate. |
| 528 virtual void ResourceDispatcherHostCreated() {} | 520 virtual void ResourceDispatcherHostCreated() {} |
| 529 | 521 |
| 522 // Notifies the embedder that the ResourceDispatcherHost is being destroyed. | |
| 523 virtual void ResourceDispatcherHostDestroyed() {} | |
|
jam
2016/08/10 00:19:26
don't need this
| |
| 524 | |
| 530 // Allows the embedder to return a delegate for the SpeechRecognitionManager. | 525 // Allows the embedder to return a delegate for the SpeechRecognitionManager. |
| 531 // The delegate will be owned by the manager. It's valid to return nullptr. | 526 // The delegate will be owned by the manager. It's valid to return nullptr. |
| 532 virtual SpeechRecognitionManagerDelegate* | 527 virtual SpeechRecognitionManagerDelegate* |
| 533 CreateSpeechRecognitionManagerDelegate(); | 528 CreateSpeechRecognitionManagerDelegate(); |
| 534 | 529 |
| 535 // Getters for common objects. | 530 // Getters for common objects. |
| 536 virtual net::NetLog* GetNetLog(); | 531 virtual net::NetLog* GetNetLog(); |
| 537 | 532 |
| 538 // Called by WebContents to override the WebKit preferences that are used by | 533 // Called by WebContents to override the WebKit preferences that are used by |
| 539 // the renderer. The content layer will add its own settings, and then it's up | 534 // the renderer. The content layer will add its own settings, and then it's up |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 778 // Allows an embedder to provide its own ExternalVideoSurfaceContainer | 773 // Allows an embedder to provide its own ExternalVideoSurfaceContainer |
| 779 // implementation. Return nullptr to disable external surface video. | 774 // implementation. Return nullptr to disable external surface video. |
| 780 virtual ExternalVideoSurfaceContainer* | 775 virtual ExternalVideoSurfaceContainer* |
| 781 OverrideCreateExternalVideoSurfaceContainer(WebContents* web_contents); | 776 OverrideCreateExternalVideoSurfaceContainer(WebContents* web_contents); |
| 782 #endif | 777 #endif |
| 783 }; | 778 }; |
| 784 | 779 |
| 785 } // namespace content | 780 } // namespace content |
| 786 | 781 |
| 787 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ | 782 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ |
| OLD | NEW |