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

Side by Side Diff: content/shell/shell_content_browser_client.h

Issue 22904002: When switching processes during redirects, update the cookie policy (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 7 years, 4 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
« no previous file with comments | « content/shell/shell.cc ('k') | content/shell/shell_content_browser_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_SHELL_SHELL_CONTENT_BROWSER_CLIENT_H_ 5 #ifndef CONTENT_SHELL_SHELL_CONTENT_BROWSER_CLIENT_H_
6 #define CONTENT_SHELL_SHELL_CONTENT_BROWSER_CLIENT_H_ 6 #define CONTENT_SHELL_SHELL_CONTENT_BROWSER_CLIENT_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/files/file_path.h" 11 #include "base/files/file_path.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/platform_file.h" 13 #include "base/platform_file.h"
14 #include "content/public/browser/content_browser_client.h" 14 #include "content/public/browser/content_browser_client.h"
15 #include "content/public/browser/notification_observer.h" 15 #include "content/public/browser/notification_observer.h"
16 #include "content/public/browser/notification_registrar.h" 16 #include "content/public/browser/notification_registrar.h"
17 17
18 namespace content { 18 namespace content {
19 19
20 class ShellBrowserContext; 20 class ShellBrowserContext;
21 class ShellBrowserMainParts; 21 class ShellBrowserMainParts;
22 class ShellResourceDispatcherHostDelegate; 22 class ShellResourceDispatcherHostDelegate;
23 23
24 class ShellContentBrowserClient : public ContentBrowserClient, 24 class ShellContentBrowserClient : public ContentBrowserClient,
25 public NotificationObserver { 25 public NotificationObserver {
26 public: 26 public:
27 // Gets the current instance. 27 // Gets the current instance.
28 static ShellContentBrowserClient* Get(); 28 static ShellContentBrowserClient* Get();
29 29
30 static void SetSwapProcessesForRedirect(bool swap);
31
30 ShellContentBrowserClient(); 32 ShellContentBrowserClient();
31 virtual ~ShellContentBrowserClient(); 33 virtual ~ShellContentBrowserClient();
32 34
33 // ContentBrowserClient overrides. 35 // ContentBrowserClient overrides.
34 virtual BrowserMainParts* CreateBrowserMainParts( 36 virtual BrowserMainParts* CreateBrowserMainParts(
35 const MainFunctionParams& parameters) OVERRIDE; 37 const MainFunctionParams& parameters) OVERRIDE;
36 virtual void RenderProcessHostCreated(RenderProcessHost* host) OVERRIDE; 38 virtual void RenderProcessHostCreated(RenderProcessHost* host) OVERRIDE;
37 virtual net::URLRequestContextGetter* CreateRequestContext( 39 virtual net::URLRequestContextGetter* CreateRequestContext(
38 BrowserContext* browser_context, 40 BrowserContext* browser_context,
39 ProtocolHandlerMap* protocol_handlers) OVERRIDE; 41 ProtocolHandlerMap* protocol_handlers) OVERRIDE;
(...skipping 10 matching lines...) Expand all
50 WebPreferences* prefs) OVERRIDE; 52 WebPreferences* prefs) OVERRIDE;
51 virtual void ResourceDispatcherHostCreated() OVERRIDE; 53 virtual void ResourceDispatcherHostCreated() OVERRIDE;
52 virtual AccessTokenStore* CreateAccessTokenStore() OVERRIDE; 54 virtual AccessTokenStore* CreateAccessTokenStore() OVERRIDE;
53 virtual std::string GetDefaultDownloadName() OVERRIDE; 55 virtual std::string GetDefaultDownloadName() OVERRIDE;
54 virtual bool SupportsBrowserPlugin(content::BrowserContext* browser_context, 56 virtual bool SupportsBrowserPlugin(content::BrowserContext* browser_context,
55 const GURL& url) OVERRIDE; 57 const GURL& url) OVERRIDE;
56 virtual WebContentsViewDelegate* GetWebContentsViewDelegate( 58 virtual WebContentsViewDelegate* GetWebContentsViewDelegate(
57 WebContents* web_contents) OVERRIDE; 59 WebContents* web_contents) OVERRIDE;
58 virtual QuotaPermissionContext* CreateQuotaPermissionContext() OVERRIDE; 60 virtual QuotaPermissionContext* CreateQuotaPermissionContext() OVERRIDE;
59 virtual net::NetLog* GetNetLog() OVERRIDE; 61 virtual net::NetLog* GetNetLog() OVERRIDE;
62 virtual bool ShouldSwapProcessesForRedirect(ResourceContext* resource_context,
63 const GURL& current_url,
64 const GURL& new_url) OVERRIDE;
60 65
61 #if defined(OS_ANDROID) 66 #if defined(OS_ANDROID)
62 virtual void GetAdditionalMappedFilesForChildProcess( 67 virtual void GetAdditionalMappedFilesForChildProcess(
63 const CommandLine& command_line, 68 const CommandLine& command_line,
64 int child_process_id, 69 int child_process_id,
65 std::vector<content::FileDescriptorInfo>* mappings) OVERRIDE; 70 std::vector<content::FileDescriptorInfo>* mappings) OVERRIDE;
66 #endif 71 #endif
67 72
68 // NotificationObserver implementation. 73 // NotificationObserver implementation.
69 virtual void Observe(int type, 74 virtual void Observe(int type,
(...skipping 19 matching lines...) Expand all
89 base::FilePath webkit_source_dir_; 94 base::FilePath webkit_source_dir_;
90 95
91 ShellBrowserMainParts* shell_browser_main_parts_; 96 ShellBrowserMainParts* shell_browser_main_parts_;
92 97
93 NotificationRegistrar registrar_; 98 NotificationRegistrar registrar_;
94 }; 99 };
95 100
96 } // namespace content 101 } // namespace content
97 102
98 #endif // CONTENT_SHELL_SHELL_CONTENT_BROWSER_CLIENT_H_ 103 #endif // CONTENT_SHELL_SHELL_CONTENT_BROWSER_CLIENT_H_
OLDNEW
« no previous file with comments | « content/shell/shell.cc ('k') | content/shell/shell_content_browser_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698