| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_BROWSER_SHELL_CONTENT_BROWSER_CLIENT_H_ | 5 #ifndef CONTENT_SHELL_BROWSER_SHELL_CONTENT_BROWSER_CLIENT_H_ |
| 6 #define CONTENT_SHELL_BROWSER_SHELL_CONTENT_BROWSER_CLIENT_H_ | 6 #define CONTENT_SHELL_BROWSER_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" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 static void SetSwapProcessesForRedirect(bool swap); | 28 static void SetSwapProcessesForRedirect(bool swap); |
| 29 | 29 |
| 30 ShellContentBrowserClient(); | 30 ShellContentBrowserClient(); |
| 31 virtual ~ShellContentBrowserClient(); | 31 virtual ~ShellContentBrowserClient(); |
| 32 | 32 |
| 33 // Will be lazily created when running layout tests. | 33 // Will be lazily created when running layout tests. |
| 34 ShellNotificationManager* GetShellNotificationManager(); | 34 ShellNotificationManager* GetShellNotificationManager(); |
| 35 | 35 |
| 36 // ContentBrowserClient overrides. | 36 // ContentBrowserClient overrides. |
| 37 virtual BrowserMainParts* CreateBrowserMainParts( | 37 virtual BrowserMainParts* CreateBrowserMainParts( |
| 38 const MainFunctionParams& parameters) OVERRIDE; | 38 const MainFunctionParams& parameters) override; |
| 39 virtual void RenderProcessWillLaunch(RenderProcessHost* host) OVERRIDE; | 39 virtual void RenderProcessWillLaunch(RenderProcessHost* host) override; |
| 40 virtual net::URLRequestContextGetter* CreateRequestContext( | 40 virtual net::URLRequestContextGetter* CreateRequestContext( |
| 41 BrowserContext* browser_context, | 41 BrowserContext* browser_context, |
| 42 ProtocolHandlerMap* protocol_handlers, | 42 ProtocolHandlerMap* protocol_handlers, |
| 43 URLRequestInterceptorScopedVector request_interceptors) OVERRIDE; | 43 URLRequestInterceptorScopedVector request_interceptors) override; |
| 44 virtual net::URLRequestContextGetter* CreateRequestContextForStoragePartition( | 44 virtual net::URLRequestContextGetter* CreateRequestContextForStoragePartition( |
| 45 BrowserContext* browser_context, | 45 BrowserContext* browser_context, |
| 46 const base::FilePath& partition_path, | 46 const base::FilePath& partition_path, |
| 47 bool in_memory, | 47 bool in_memory, |
| 48 ProtocolHandlerMap* protocol_handlers, | 48 ProtocolHandlerMap* protocol_handlers, |
| 49 URLRequestInterceptorScopedVector request_interceptors) OVERRIDE; | 49 URLRequestInterceptorScopedVector request_interceptors) override; |
| 50 virtual bool IsHandledURL(const GURL& url) OVERRIDE; | 50 virtual bool IsHandledURL(const GURL& url) override; |
| 51 virtual void AppendExtraCommandLineSwitches(base::CommandLine* command_line, | 51 virtual void AppendExtraCommandLineSwitches(base::CommandLine* command_line, |
| 52 int child_process_id) OVERRIDE; | 52 int child_process_id) override; |
| 53 virtual void OverrideWebkitPrefs(RenderViewHost* render_view_host, | 53 virtual void OverrideWebkitPrefs(RenderViewHost* render_view_host, |
| 54 const GURL& url, | 54 const GURL& url, |
| 55 WebPreferences* prefs) OVERRIDE; | 55 WebPreferences* prefs) override; |
| 56 virtual void ResourceDispatcherHostCreated() OVERRIDE; | 56 virtual void ResourceDispatcherHostCreated() override; |
| 57 virtual AccessTokenStore* CreateAccessTokenStore() OVERRIDE; | 57 virtual AccessTokenStore* CreateAccessTokenStore() override; |
| 58 virtual std::string GetDefaultDownloadName() OVERRIDE; | 58 virtual std::string GetDefaultDownloadName() override; |
| 59 virtual WebContentsViewDelegate* GetWebContentsViewDelegate( | 59 virtual WebContentsViewDelegate* GetWebContentsViewDelegate( |
| 60 WebContents* web_contents) OVERRIDE; | 60 WebContents* web_contents) override; |
| 61 virtual QuotaPermissionContext* CreateQuotaPermissionContext() OVERRIDE; | 61 virtual QuotaPermissionContext* CreateQuotaPermissionContext() override; |
| 62 virtual void RequestDesktopNotificationPermission( | 62 virtual void RequestDesktopNotificationPermission( |
| 63 const GURL& source_origin, | 63 const GURL& source_origin, |
| 64 RenderFrameHost* render_frame_host, | 64 RenderFrameHost* render_frame_host, |
| 65 const base::Callback<void(blink::WebNotificationPermission)>& callback) | 65 const base::Callback<void(blink::WebNotificationPermission)>& callback) |
| 66 OVERRIDE; | 66 override; |
| 67 virtual blink::WebNotificationPermission | 67 virtual blink::WebNotificationPermission |
| 68 CheckDesktopNotificationPermission( | 68 CheckDesktopNotificationPermission( |
| 69 const GURL& source_url, | 69 const GURL& source_url, |
| 70 ResourceContext* context, | 70 ResourceContext* context, |
| 71 int render_process_id) OVERRIDE; | 71 int render_process_id) override; |
| 72 virtual SpeechRecognitionManagerDelegate* | 72 virtual SpeechRecognitionManagerDelegate* |
| 73 GetSpeechRecognitionManagerDelegate() OVERRIDE; | 73 GetSpeechRecognitionManagerDelegate() override; |
| 74 virtual net::NetLog* GetNetLog() OVERRIDE; | 74 virtual net::NetLog* GetNetLog() override; |
| 75 virtual bool ShouldSwapProcessesForRedirect(ResourceContext* resource_context, | 75 virtual bool ShouldSwapProcessesForRedirect(ResourceContext* resource_context, |
| 76 const GURL& current_url, | 76 const GURL& current_url, |
| 77 const GURL& new_url) OVERRIDE; | 77 const GURL& new_url) override; |
| 78 virtual DevToolsManagerDelegate* GetDevToolsManagerDelegate() OVERRIDE; | 78 virtual DevToolsManagerDelegate* GetDevToolsManagerDelegate() override; |
| 79 | 79 |
| 80 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 80 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
| 81 virtual void GetAdditionalMappedFilesForChildProcess( | 81 virtual void GetAdditionalMappedFilesForChildProcess( |
| 82 const base::CommandLine& command_line, | 82 const base::CommandLine& command_line, |
| 83 int child_process_id, | 83 int child_process_id, |
| 84 FileDescriptorInfo* mappings) OVERRIDE; | 84 FileDescriptorInfo* mappings) override; |
| 85 #endif | 85 #endif |
| 86 #if defined(OS_WIN) | 86 #if defined(OS_WIN) |
| 87 virtual void PreSpawnRenderer(sandbox::TargetPolicy* policy, | 87 virtual void PreSpawnRenderer(sandbox::TargetPolicy* policy, |
| 88 bool* success) OVERRIDE; | 88 bool* success) override; |
| 89 #endif | 89 #endif |
| 90 | 90 |
| 91 ShellBrowserContext* browser_context(); | 91 ShellBrowserContext* browser_context(); |
| 92 ShellBrowserContext* off_the_record_browser_context(); | 92 ShellBrowserContext* off_the_record_browser_context(); |
| 93 ShellResourceDispatcherHostDelegate* resource_dispatcher_host_delegate() { | 93 ShellResourceDispatcherHostDelegate* resource_dispatcher_host_delegate() { |
| 94 return resource_dispatcher_host_delegate_.get(); | 94 return resource_dispatcher_host_delegate_.get(); |
| 95 } | 95 } |
| 96 ShellBrowserMainParts* shell_browser_main_parts() { | 96 ShellBrowserMainParts* shell_browser_main_parts() { |
| 97 return shell_browser_main_parts_; | 97 return shell_browser_main_parts_; |
| 98 } | 98 } |
| 99 | 99 |
| 100 private: | 100 private: |
| 101 ShellBrowserContext* ShellBrowserContextForBrowserContext( | 101 ShellBrowserContext* ShellBrowserContextForBrowserContext( |
| 102 BrowserContext* content_browser_context); | 102 BrowserContext* content_browser_context); |
| 103 | 103 |
| 104 scoped_ptr<ShellNotificationManager> shell_notification_manager_; | 104 scoped_ptr<ShellNotificationManager> shell_notification_manager_; |
| 105 | 105 |
| 106 scoped_ptr<ShellResourceDispatcherHostDelegate> | 106 scoped_ptr<ShellResourceDispatcherHostDelegate> |
| 107 resource_dispatcher_host_delegate_; | 107 resource_dispatcher_host_delegate_; |
| 108 | 108 |
| 109 base::FilePath webkit_source_dir_; | 109 base::FilePath webkit_source_dir_; |
| 110 | 110 |
| 111 ShellBrowserMainParts* shell_browser_main_parts_; | 111 ShellBrowserMainParts* shell_browser_main_parts_; |
| 112 }; | 112 }; |
| 113 | 113 |
| 114 } // namespace content | 114 } // namespace content |
| 115 | 115 |
| 116 #endif // CONTENT_SHELL_BROWSER_SHELL_CONTENT_BROWSER_CLIENT_H_ | 116 #endif // CONTENT_SHELL_BROWSER_SHELL_CONTENT_BROWSER_CLIENT_H_ |
| OLD | NEW |