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" |
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 "content/public/browser/content_browser_client.h" | 13 #include "content/public/browser/content_browser_client.h" |
14 #include "content/shell/browser/shell_speech_recognition_manager_delegate.h" | 14 #include "content/shell/browser/shell_speech_recognition_manager_delegate.h" |
15 | 15 |
16 namespace content { | 16 namespace content { |
17 | 17 |
18 class ShellBrowserContext; | 18 class ShellBrowserContext; |
19 class ShellBrowserMainParts; | 19 class ShellBrowserMainParts; |
20 class ShellResourceDispatcherHostDelegate; | 20 class ShellResourceDispatcherHostDelegate; |
21 | 21 |
22 class ShellContentBrowserClient : public ContentBrowserClient { | 22 class ShellContentBrowserClient : public ContentBrowserClient { |
23 public: | 23 public: |
24 // Gets the current instance. | 24 // Gets the current instance. |
25 static ShellContentBrowserClient* Get(); | 25 static ShellContentBrowserClient* Get(); |
26 | 26 |
27 static void SetSwapProcessesForRedirect(bool swap); | 27 static void SetSwapProcessesForRedirect(bool swap); |
28 | 28 |
29 ShellContentBrowserClient(); | 29 ShellContentBrowserClient(); |
30 virtual ~ShellContentBrowserClient(); | 30 ~ShellContentBrowserClient() override; |
31 | 31 |
32 // ContentBrowserClient overrides. | 32 // ContentBrowserClient overrides. |
33 virtual BrowserMainParts* CreateBrowserMainParts( | 33 BrowserMainParts* CreateBrowserMainParts( |
34 const MainFunctionParams& parameters) override; | 34 const MainFunctionParams& parameters) override; |
35 virtual void RenderProcessWillLaunch(RenderProcessHost* host) override; | 35 void RenderProcessWillLaunch(RenderProcessHost* host) override; |
36 virtual net::URLRequestContextGetter* CreateRequestContext( | 36 net::URLRequestContextGetter* CreateRequestContext( |
37 BrowserContext* browser_context, | 37 BrowserContext* browser_context, |
38 ProtocolHandlerMap* protocol_handlers, | 38 ProtocolHandlerMap* protocol_handlers, |
39 URLRequestInterceptorScopedVector request_interceptors) override; | 39 URLRequestInterceptorScopedVector request_interceptors) override; |
40 virtual net::URLRequestContextGetter* CreateRequestContextForStoragePartition( | 40 net::URLRequestContextGetter* CreateRequestContextForStoragePartition( |
41 BrowserContext* browser_context, | 41 BrowserContext* browser_context, |
42 const base::FilePath& partition_path, | 42 const base::FilePath& partition_path, |
43 bool in_memory, | 43 bool in_memory, |
44 ProtocolHandlerMap* protocol_handlers, | 44 ProtocolHandlerMap* protocol_handlers, |
45 URLRequestInterceptorScopedVector request_interceptors) override; | 45 URLRequestInterceptorScopedVector request_interceptors) override; |
46 virtual bool IsHandledURL(const GURL& url) override; | 46 bool IsHandledURL(const GURL& url) override; |
47 virtual void AppendExtraCommandLineSwitches(base::CommandLine* command_line, | 47 void AppendExtraCommandLineSwitches(base::CommandLine* command_line, |
48 int child_process_id) override; | 48 int child_process_id) override; |
49 virtual void OverrideWebkitPrefs(RenderViewHost* render_view_host, | 49 void OverrideWebkitPrefs(RenderViewHost* render_view_host, |
50 const GURL& url, | 50 const GURL& url, |
51 WebPreferences* prefs) override; | 51 WebPreferences* prefs) override; |
52 virtual void ResourceDispatcherHostCreated() override; | 52 void ResourceDispatcherHostCreated() override; |
53 virtual AccessTokenStore* CreateAccessTokenStore() override; | 53 AccessTokenStore* CreateAccessTokenStore() override; |
54 virtual std::string GetDefaultDownloadName() override; | 54 std::string GetDefaultDownloadName() override; |
55 virtual WebContentsViewDelegate* GetWebContentsViewDelegate( | 55 WebContentsViewDelegate* GetWebContentsViewDelegate( |
56 WebContents* web_contents) override; | 56 WebContents* web_contents) override; |
57 virtual QuotaPermissionContext* CreateQuotaPermissionContext() override; | 57 QuotaPermissionContext* CreateQuotaPermissionContext() override; |
58 virtual SpeechRecognitionManagerDelegate* | 58 SpeechRecognitionManagerDelegate* GetSpeechRecognitionManagerDelegate() |
59 GetSpeechRecognitionManagerDelegate() override; | 59 override; |
60 virtual net::NetLog* GetNetLog() override; | 60 net::NetLog* GetNetLog() override; |
61 virtual bool ShouldSwapProcessesForRedirect(ResourceContext* resource_context, | 61 bool ShouldSwapProcessesForRedirect(ResourceContext* resource_context, |
62 const GURL& current_url, | 62 const GURL& current_url, |
63 const GURL& new_url) override; | 63 const GURL& new_url) override; |
64 virtual DevToolsManagerDelegate* GetDevToolsManagerDelegate() override; | 64 DevToolsManagerDelegate* GetDevToolsManagerDelegate() override; |
65 | 65 |
66 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 66 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
67 virtual void GetAdditionalMappedFilesForChildProcess( | 67 virtual void GetAdditionalMappedFilesForChildProcess( |
68 const base::CommandLine& command_line, | 68 const base::CommandLine& command_line, |
69 int child_process_id, | 69 int child_process_id, |
70 FileDescriptorInfo* mappings) override; | 70 FileDescriptorInfo* mappings) override; |
71 #endif | 71 #endif |
72 #if defined(OS_WIN) | 72 #if defined(OS_WIN) |
73 virtual void PreSpawnRenderer(sandbox::TargetPolicy* policy, | 73 virtual void PreSpawnRenderer(sandbox::TargetPolicy* policy, |
74 bool* success) override; | 74 bool* success) override; |
(...skipping 14 matching lines...) Expand all Loading... |
89 | 89 |
90 scoped_ptr<ShellResourceDispatcherHostDelegate> | 90 scoped_ptr<ShellResourceDispatcherHostDelegate> |
91 resource_dispatcher_host_delegate_; | 91 resource_dispatcher_host_delegate_; |
92 | 92 |
93 ShellBrowserMainParts* shell_browser_main_parts_; | 93 ShellBrowserMainParts* shell_browser_main_parts_; |
94 }; | 94 }; |
95 | 95 |
96 } // namespace content | 96 } // namespace content |
97 | 97 |
98 #endif // CONTENT_SHELL_BROWSER_SHELL_CONTENT_BROWSER_CLIENT_H_ | 98 #endif // CONTENT_SHELL_BROWSER_SHELL_CONTENT_BROWSER_CLIENT_H_ |
OLD | NEW |