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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
138 virtual bool ShouldTryToUseExistingProcessHost( | 138 virtual bool ShouldTryToUseExistingProcessHost( |
139 BrowserContext* browser_context, const GURL& url); | 139 BrowserContext* browser_context, const GURL& url); |
140 | 140 |
141 // Called when a site instance is first associated with a process. | 141 // Called when a site instance is first associated with a process. |
142 virtual void SiteInstanceGotProcess(SiteInstance* site_instance) {} | 142 virtual void SiteInstanceGotProcess(SiteInstance* site_instance) {} |
143 | 143 |
144 // Called from a site instance's destructor. | 144 // Called from a site instance's destructor. |
145 virtual void SiteInstanceDeleting(SiteInstance* site_instance) {} | 145 virtual void SiteInstanceDeleting(SiteInstance* site_instance) {} |
146 | 146 |
147 // Returns true if for the navigation from |current_url| to |new_url|, | 147 // Returns true if for the navigation from |current_url| to |new_url|, |
148 // processes should be swapped (even if we are in a process model that | 148 // a new SiteInstance and BrowsingInstance should be created (even if we are |
149 // doesn't usually swap). | 149 // in a process model that doesn't usually swap). This forces a process swap |
150 virtual bool ShouldSwapProcessesForNavigation(const GURL& current_url, | 150 // and severs script connections with existing tabs. |
151 const GURL& new_url); | 151 virtual bool ShouldSwapBrowsingInstancesForNavigation( |
darin (slow to review)
2012/05/31 04:43:08
Why pluralize BrowsingInstance here? Also, it loo
Charlie Reis
2012/05/31 17:58:23
Seemed consistent with ShouldSwapProcessesForX. I
| |
152 BrowserContext* browser_context, | |
153 const GURL& current_url, | |
154 const GURL& new_url); | |
152 | 155 |
153 // Returns true if the given navigation redirect should cause a renderer | 156 // Returns true if the given navigation redirect should cause a renderer |
154 // process swap. | 157 // process swap. |
155 // This is called on the IO thread. | 158 // This is called on the IO thread. |
156 virtual bool ShouldSwapProcessesForRedirect(ResourceContext* resource_context, | 159 virtual bool ShouldSwapProcessesForRedirect(ResourceContext* resource_context, |
darin (slow to review)
2012/05/31 04:43:08
nit: Should this function be similarly renamed?
Charlie Reis
2012/05/31 17:58:23
I thought about that but decided (naming similarit
| |
157 const GURL& current_url, | 160 const GURL& current_url, |
158 const GURL& new_url); | 161 const GURL& new_url); |
159 | 162 |
160 // See CharacterEncoding's comment. | 163 // See CharacterEncoding's comment. |
161 virtual std::string GetCanonicalEncodingNameByAliasName( | 164 virtual std::string GetCanonicalEncodingNameByAliasName( |
162 const std::string& alias_name); | 165 const std::string& alias_name); |
163 | 166 |
164 // Allows the embedder to pass extra command line flags. | 167 // Allows the embedder to pass extra command line flags. |
165 // switches::kProcessType will already be set at this point. | 168 // switches::kProcessType will already be set at this point. |
166 virtual void AppendExtraCommandLineSwitches(CommandLine* command_line, | 169 virtual void AppendExtraCommandLineSwitches(CommandLine* command_line, |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
417 const GURL& url); | 420 const GURL& url); |
418 #endif | 421 #endif |
419 | 422 |
420 protected: | 423 protected: |
421 virtual ~ContentBrowserClient() {} | 424 virtual ~ContentBrowserClient() {} |
422 }; | 425 }; |
423 | 426 |
424 } // namespace content | 427 } // namespace content |
425 | 428 |
426 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ | 429 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ |
OLD | NEW |