| 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 WebContents* embedder_web_contents) {} | 132 WebContents* embedder_web_contents) {} |
| 133 | 133 |
| 134 // Notifies that a RenderProcessHost has been created. This is called before | 134 // Notifies that a RenderProcessHost has been created. This is called before |
| 135 // the content layer adds its own BrowserMessageFilters, so that the | 135 // the content layer adds its own BrowserMessageFilters, so that the |
| 136 // embedder's IPC filters have priority. | 136 // embedder's IPC filters have priority. |
| 137 virtual void RenderProcessHostCreated(RenderProcessHost* host) {} | 137 virtual void RenderProcessHostCreated(RenderProcessHost* host) {} |
| 138 | 138 |
| 139 // Notifies that a BrowserChildProcessHost has been created. | 139 // Notifies that a BrowserChildProcessHost has been created. |
| 140 virtual void BrowserChildProcessHostCreated(BrowserChildProcessHost* host) {} | 140 virtual void BrowserChildProcessHostCreated(BrowserChildProcessHost* host) {} |
| 141 | 141 |
| 142 // Determines whether a navigation from |current_instance| to |url| would be a |
| 143 // valid entry point to a "privileged site," based on whether it |
| 144 // |is_renderer_initiated|. A privileged site requires careful process |
| 145 // isolation to ensure its privileges do not leak, and it can only be entered |
| 146 // via known navigation paths. |
| 147 // |
| 148 // If this is a valid entry to a privileged site, this function should rewrite |
| 149 // the origin of |url| with a non-http(s) origin that represents the |
| 150 // privileged site. This will distinguish the resulting SiteInstance from |
| 151 // other SiteInstances in the process model. |
| 152 virtual GURL GetPossiblyPrivilegedURL( |
| 153 content::BrowserContext* browser_context, |
| 154 const GURL& url, |
| 155 bool is_renderer_initiated, |
| 156 SiteInstance* current_instance); |
| 157 |
| 142 // Get the effective URL for the given actual URL, to allow an embedder to | 158 // Get the effective URL for the given actual URL, to allow an embedder to |
| 143 // group different url schemes in the same SiteInstance. | 159 // group different url schemes in the same SiteInstance. |
| 144 virtual GURL GetEffectiveURL(BrowserContext* browser_context, | 160 virtual GURL GetEffectiveURL(BrowserContext* browser_context, |
| 145 const GURL& url); | 161 const GURL& url); |
| 146 | 162 |
| 147 // Returns whether all instances of the specified effective URL should be | 163 // Returns whether all instances of the specified effective URL should be |
| 148 // rendered by the same process, rather than using process-per-site-instance. | 164 // rendered by the same process, rather than using process-per-site-instance. |
| 149 virtual bool ShouldUseProcessPerSite(BrowserContext* browser_context, | 165 virtual bool ShouldUseProcessPerSite(BrowserContext* browser_context, |
| 150 const GURL& effective_url); | 166 const GURL& effective_url); |
| 151 | 167 |
| (...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 529 // This is called on a worker thread. | 545 // This is called on a worker thread. |
| 530 virtual | 546 virtual |
| 531 crypto::CryptoModuleBlockingPasswordDelegate* GetCryptoPasswordDelegate( | 547 crypto::CryptoModuleBlockingPasswordDelegate* GetCryptoPasswordDelegate( |
| 532 const GURL& url); | 548 const GURL& url); |
| 533 #endif | 549 #endif |
| 534 }; | 550 }; |
| 535 | 551 |
| 536 } // namespace content | 552 } // namespace content |
| 537 | 553 |
| 538 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ | 554 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ |
| OLD | NEW |