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 <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 virtual bool ShouldTryToUseExistingProcessHost( | 145 virtual bool ShouldTryToUseExistingProcessHost( |
146 BrowserContext* browser_context, const GURL& url); | 146 BrowserContext* browser_context, const GURL& url); |
147 | 147 |
148 // Called when a site instance is first associated with a process. | 148 // Called when a site instance is first associated with a process. |
149 virtual void SiteInstanceGotProcess(SiteInstance* site_instance) {} | 149 virtual void SiteInstanceGotProcess(SiteInstance* site_instance) {} |
150 | 150 |
151 // Called from a site instance's destructor. | 151 // Called from a site instance's destructor. |
152 virtual void SiteInstanceDeleting(SiteInstance* site_instance) {} | 152 virtual void SiteInstanceDeleting(SiteInstance* site_instance) {} |
153 | 153 |
154 // Returns true if for the navigation from |current_url| to |new_url|, | 154 // Returns true if for the navigation from |current_url| to |new_url|, |
155 // processes should be swapped (even if we are in a process model that | 155 // a new SiteInstance and BrowsingInstance should be created (even if we are |
156 // doesn't usually swap). | 156 // in a process model that doesn't usually swap). This forces a process swap |
157 virtual bool ShouldSwapProcessesForNavigation(const GURL& current_url, | 157 // and severs script connections with existing tabs. |
158 const GURL& new_url); | 158 virtual bool ShouldSwapBrowsingInstanceForNavigation( |
| 159 BrowserContext* browser_context, |
| 160 const GURL& current_url, |
| 161 const GURL& new_url); |
159 | 162 |
160 // Returns true if the given navigation redirect should cause a renderer | 163 // Returns true if the given navigation redirect should cause a renderer |
161 // process swap. | 164 // process swap. |
162 // This is called on the IO thread. | 165 // This is called on the IO thread. |
163 virtual bool ShouldSwapProcessesForRedirect(ResourceContext* resource_context, | 166 virtual bool ShouldSwapProcessesForRedirect(ResourceContext* resource_context, |
164 const GURL& current_url, | 167 const GURL& current_url, |
165 const GURL& new_url); | 168 const GURL& new_url); |
166 | 169 |
167 // See CharacterEncoding's comment. | 170 // See CharacterEncoding's comment. |
168 virtual std::string GetCanonicalEncodingNameByAliasName( | 171 virtual std::string GetCanonicalEncodingNameByAliasName( |
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
476 // This is called on a worker thread. | 479 // This is called on a worker thread. |
477 virtual | 480 virtual |
478 crypto::CryptoModuleBlockingPasswordDelegate* GetCryptoPasswordDelegate( | 481 crypto::CryptoModuleBlockingPasswordDelegate* GetCryptoPasswordDelegate( |
479 const GURL& url); | 482 const GURL& url); |
480 #endif | 483 #endif |
481 }; | 484 }; |
482 | 485 |
483 } // namespace content | 486 } // namespace content |
484 | 487 |
485 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ | 488 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ |
OLD | NEW |