Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(43)

Side by Side Diff: content/public/browser/content_browser_client.h

Issue 233353003: Only commit cookie changes in prerenders after a prerender is shown (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Add browser tests, fix a bug in what was changed yesterday. Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 235
236 // Returns whether a URL should be allowed to open from a specific context. 236 // Returns whether a URL should be allowed to open from a specific context.
237 // This also applies in cases where the new URL will open in another process. 237 // This also applies in cases where the new URL will open in another process.
238 virtual bool ShouldAllowOpenURL(SiteInstance* site_instance, const GURL& url); 238 virtual bool ShouldAllowOpenURL(SiteInstance* site_instance, const GURL& url);
239 239
240 // Returns whether a new view for a given |site_url| can be launched in a 240 // Returns whether a new view for a given |site_url| can be launched in a
241 // given |process_host|. 241 // given |process_host|.
242 virtual bool IsSuitableHost(RenderProcessHost* process_host, 242 virtual bool IsSuitableHost(RenderProcessHost* process_host,
243 const GURL& site_url); 243 const GURL& site_url);
244 244
245 // Returns whether a new view for a new site instance can be added to a
246 // given |process_host|.
247 virtual bool MayReuseHost(RenderProcessHost* process_host);
248
245 // Returns whether a new process should be created or an existing one should 249 // Returns whether a new process should be created or an existing one should
246 // be reused based on the URL we want to load. This should return false, 250 // be reused based on the URL we want to load. This should return false,
247 // unless there is a good reason otherwise. 251 // unless there is a good reason otherwise.
248 virtual bool ShouldTryToUseExistingProcessHost( 252 virtual bool ShouldTryToUseExistingProcessHost(
249 BrowserContext* browser_context, const GURL& url); 253 BrowserContext* browser_context, const GURL& url);
250 254
251 // Called when a site instance is first associated with a process. 255 // Called when a site instance is first associated with a process.
252 virtual void SiteInstanceGotProcess(SiteInstance* site_instance) {} 256 virtual void SiteInstanceGotProcess(SiteInstance* site_instance) {}
253 257
254 // Called from a site instance's destructor. 258 // Called from a site instance's destructor.
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
632 content::BrowserContext* browser_context, 636 content::BrowserContext* browser_context,
633 const GURL& url); 637 const GURL& url);
634 638
635 // Returns true if dev channel APIs are available for plugins. 639 // Returns true if dev channel APIs are available for plugins.
636 virtual bool IsPluginAllowedToUseDevChannelAPIs(); 640 virtual bool IsPluginAllowedToUseDevChannelAPIs();
637 641
638 // Returns a special cookie store to use for a given render process, or NULL 642 // Returns a special cookie store to use for a given render process, or NULL
639 // if the default cookie store should be used 643 // if the default cookie store should be used
640 // This is called on the IO thread. 644 // This is called on the IO thread.
641 virtual net::CookieStore* OverrideCookieStoreForRenderProcess( 645 virtual net::CookieStore* OverrideCookieStoreForRenderProcess(
642 int render_process_id_); 646 int render_process_id);
643 647
644 #if defined(VIDEO_HOLE) 648 #if defined(VIDEO_HOLE)
645 // Allows an embedder to provide its own ExternalVideoSurfaceContainer 649 // Allows an embedder to provide its own ExternalVideoSurfaceContainer
646 // implementation. Return NULL to disable external surface video. 650 // implementation. Return NULL to disable external surface video.
647 virtual ExternalVideoSurfaceContainer* 651 virtual ExternalVideoSurfaceContainer*
648 OverrideCreateExternalVideoSurfaceContainer(WebContents* web_contents); 652 OverrideCreateExternalVideoSurfaceContainer(WebContents* web_contents);
649 #endif 653 #endif
650 }; 654 };
651 655
652 } // namespace content 656 } // namespace content
653 657
654 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ 658 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698