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_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/file_path.h" | 11 #include "base/file_path.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "content/public/browser/content_browser_client.h" | 13 #include "content/public/browser/content_browser_client.h" |
14 | 14 |
15 namespace content { | 15 namespace content { |
16 | 16 |
17 class ShellBrowserContext; | 17 class ShellBrowserContext; |
18 class ShellBrowserMainParts; | 18 class ShellBrowserMainParts; |
19 class ShellResourceDispatcherHostDelegate; | 19 class ShellResourceDispatcherHostDelegate; |
20 | 20 |
21 class ShellContentBrowserClient : public ContentBrowserClient { | 21 class ShellContentBrowserClient : public ContentBrowserClient { |
22 public: | 22 public: |
23 ShellContentBrowserClient(); | 23 ShellContentBrowserClient(); |
24 virtual ~ShellContentBrowserClient(); | 24 virtual ~ShellContentBrowserClient(); |
25 | 25 |
26 // ContentBrowserClient overrides. | 26 // ContentBrowserClient overrides. |
27 virtual BrowserMainParts* CreateBrowserMainParts( | 27 virtual BrowserMainParts* CreateBrowserMainParts( |
28 const MainFunctionParams& parameters) OVERRIDE; | 28 const MainFunctionParams& parameters) OVERRIDE; |
29 virtual void RenderProcessHostCreated(RenderProcessHost* host) OVERRIDE; | 29 virtual void RenderProcessHostCreated(RenderProcessHost* host) OVERRIDE; |
| 30 virtual net::URLRequestContextGetter* CreateRequestContext( |
| 31 BrowserContext* browser_context, |
| 32 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 33 blob_protocol_handler, |
| 34 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 35 file_system_protocol_handler, |
| 36 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 37 developer_protocol_handler, |
| 38 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 39 chrome_protocol_handler, |
| 40 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 41 chrome_devtools_protocol_handler) OVERRIDE; |
| 42 virtual net::URLRequestContextGetter* CreateRequestContextForStoragePartition( |
| 43 BrowserContext* browser_context, |
| 44 const FilePath& partition_path, |
| 45 bool in_memory, |
| 46 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 47 blob_protocol_handler, |
| 48 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 49 file_system_protocol_handler, |
| 50 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 51 developer_protocol_handler, |
| 52 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 53 chrome_protocol_handler, |
| 54 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 55 chrome_devtools_protocol_handler) OVERRIDE; |
30 virtual void AppendExtraCommandLineSwitches(CommandLine* command_line, | 56 virtual void AppendExtraCommandLineSwitches(CommandLine* command_line, |
31 int child_process_id) OVERRIDE; | 57 int child_process_id) OVERRIDE; |
32 virtual void OverrideWebkitPrefs(RenderViewHost* render_view_host, | 58 virtual void OverrideWebkitPrefs(RenderViewHost* render_view_host, |
33 const GURL& url, | 59 const GURL& url, |
34 webkit_glue::WebPreferences* prefs) OVERRIDE; | 60 webkit_glue::WebPreferences* prefs) OVERRIDE; |
35 virtual void ResourceDispatcherHostCreated() OVERRIDE; | 61 virtual void ResourceDispatcherHostCreated() OVERRIDE; |
36 virtual AccessTokenStore* CreateAccessTokenStore() OVERRIDE; | 62 virtual AccessTokenStore* CreateAccessTokenStore() OVERRIDE; |
37 virtual std::string GetDefaultDownloadName() OVERRIDE; | 63 virtual std::string GetDefaultDownloadName() OVERRIDE; |
38 virtual WebContentsViewDelegate* GetWebContentsViewDelegate( | 64 virtual WebContentsViewDelegate* GetWebContentsViewDelegate( |
39 WebContents* web_contents) OVERRIDE; | 65 WebContents* web_contents) OVERRIDE; |
(...skipping 15 matching lines...) Expand all Loading... |
55 ShellBrowserContext* browser_context(); | 81 ShellBrowserContext* browser_context(); |
56 ShellBrowserContext* off_the_record_browser_context(); | 82 ShellBrowserContext* off_the_record_browser_context(); |
57 ShellResourceDispatcherHostDelegate* resource_dispatcher_host_delegate() { | 83 ShellResourceDispatcherHostDelegate* resource_dispatcher_host_delegate() { |
58 return resource_dispatcher_host_delegate_.get(); | 84 return resource_dispatcher_host_delegate_.get(); |
59 } | 85 } |
60 ShellBrowserMainParts* shell_browser_main_parts() { | 86 ShellBrowserMainParts* shell_browser_main_parts() { |
61 return shell_browser_main_parts_; | 87 return shell_browser_main_parts_; |
62 } | 88 } |
63 | 89 |
64 private: | 90 private: |
| 91 ShellBrowserContext* ShellBrowserContextForBrowserContext( |
| 92 BrowserContext* content_browser_context); |
| 93 |
65 scoped_ptr<ShellResourceDispatcherHostDelegate> | 94 scoped_ptr<ShellResourceDispatcherHostDelegate> |
66 resource_dispatcher_host_delegate_; | 95 resource_dispatcher_host_delegate_; |
67 | 96 |
68 base::FilePath webkit_source_dir_; | 97 base::FilePath webkit_source_dir_; |
69 | 98 |
70 ShellBrowserMainParts* shell_browser_main_parts_; | 99 ShellBrowserMainParts* shell_browser_main_parts_; |
71 }; | 100 }; |
72 | 101 |
73 } // namespace content | 102 } // namespace content |
74 | 103 |
75 #endif // CONTENT_SHELL_SHELL_CONTENT_BROWSER_CLIENT_H_ | 104 #endif // CONTENT_SHELL_SHELL_CONTENT_BROWSER_CLIENT_H_ |
OLD | NEW |