| 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::Interceptor> |
| 37 developer_protocol_handler) OVERRIDE; |
| 38 virtual net::URLRequestContextGetter* CreateRequestContextForStoragePartition( |
| 39 BrowserContext* browser_context, |
| 40 const FilePath& partition_path, |
| 41 bool in_memory, |
| 42 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 43 blob_protocol_handler, |
| 44 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 45 file_system_protocol_handler, |
| 46 scoped_ptr<net::URLRequestJobFactory::Interceptor> |
| 47 developer_protocol_handler) OVERRIDE; |
| 30 virtual void AppendExtraCommandLineSwitches(CommandLine* command_line, | 48 virtual void AppendExtraCommandLineSwitches(CommandLine* command_line, |
| 31 int child_process_id) OVERRIDE; | 49 int child_process_id) OVERRIDE; |
| 32 virtual void OverrideWebkitPrefs(RenderViewHost* render_view_host, | 50 virtual void OverrideWebkitPrefs(RenderViewHost* render_view_host, |
| 33 const GURL& url, | 51 const GURL& url, |
| 34 webkit_glue::WebPreferences* prefs) OVERRIDE; | 52 webkit_glue::WebPreferences* prefs) OVERRIDE; |
| 35 virtual void ResourceDispatcherHostCreated() OVERRIDE; | 53 virtual void ResourceDispatcherHostCreated() OVERRIDE; |
| 36 virtual AccessTokenStore* CreateAccessTokenStore() OVERRIDE; | 54 virtual AccessTokenStore* CreateAccessTokenStore() OVERRIDE; |
| 37 virtual std::string GetDefaultDownloadName() OVERRIDE; | 55 virtual std::string GetDefaultDownloadName() OVERRIDE; |
| 38 virtual WebContentsViewDelegate* GetWebContentsViewDelegate( | 56 virtual WebContentsViewDelegate* GetWebContentsViewDelegate( |
| 39 WebContents* web_contents) OVERRIDE; | 57 WebContents* web_contents) OVERRIDE; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 55 ShellBrowserContext* browser_context(); | 73 ShellBrowserContext* browser_context(); |
| 56 ShellBrowserContext* off_the_record_browser_context(); | 74 ShellBrowserContext* off_the_record_browser_context(); |
| 57 ShellResourceDispatcherHostDelegate* resource_dispatcher_host_delegate() { | 75 ShellResourceDispatcherHostDelegate* resource_dispatcher_host_delegate() { |
| 58 return resource_dispatcher_host_delegate_.get(); | 76 return resource_dispatcher_host_delegate_.get(); |
| 59 } | 77 } |
| 60 ShellBrowserMainParts* shell_browser_main_parts() { | 78 ShellBrowserMainParts* shell_browser_main_parts() { |
| 61 return shell_browser_main_parts_; | 79 return shell_browser_main_parts_; |
| 62 } | 80 } |
| 63 | 81 |
| 64 private: | 82 private: |
| 83 ShellBrowserContext* ShellBrowserContextForBrowserContext( |
| 84 BrowserContext* content_browser_context); |
| 85 |
| 65 scoped_ptr<ShellResourceDispatcherHostDelegate> | 86 scoped_ptr<ShellResourceDispatcherHostDelegate> |
| 66 resource_dispatcher_host_delegate_; | 87 resource_dispatcher_host_delegate_; |
| 67 | 88 |
| 68 FilePath webkit_source_dir_; | 89 FilePath webkit_source_dir_; |
| 69 | 90 |
| 70 ShellBrowserMainParts* shell_browser_main_parts_; | 91 ShellBrowserMainParts* shell_browser_main_parts_; |
| 71 }; | 92 }; |
| 72 | 93 |
| 73 } // namespace content | 94 } // namespace content |
| 74 | 95 |
| 75 #endif // CONTENT_SHELL_SHELL_CONTENT_BROWSER_CLIENT_H_ | 96 #endif // CONTENT_SHELL_SHELL_CONTENT_BROWSER_CLIENT_H_ |
| OLD | NEW |