| 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 <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 12 #include "base/files/file_path.h" | 12 #include "base/files/file_path.h" |
| 13 #include "build/build_config.h" | 13 #include "build/build_config.h" |
| 14 #include "content/public/browser/content_browser_client.h" | 14 #include "content/public/browser/content_browser_client.h" |
| 15 #include "content/shell/browser/shell_resource_dispatcher_host_delegate.h" | 15 #include "content/shell/browser/shell_resource_dispatcher_host_delegate.h" |
| 16 #include "content/shell/browser/shell_speech_recognition_manager_delegate.h" | 16 #include "content/shell/browser/shell_speech_recognition_manager_delegate.h" |
| 17 | 17 |
| 18 namespace content { | 18 namespace content { |
| 19 | 19 |
| 20 class ShellBrowserContext; | 20 class ShellBrowserContext; |
| 21 class ShellBrowserMainParts; | 21 class ShellBrowserMainParts; |
| 22 | 22 |
| 23 class ShellContentBrowserClient : public ContentBrowserClient { | 23 class ShellContentBrowserClient : public ContentBrowserClient { |
| 24 public: | 24 public: |
| 25 // Gets the current instance. | 25 // Gets the current instance. |
| 26 static ShellContentBrowserClient* Get(); | 26 static ShellContentBrowserClient* Get(); |
| 27 | 27 |
| 28 static void SetSwapProcessesForRedirect(bool swap); | 28 static void SetTransferAllNavigations(bool transfer); |
| 29 | 29 |
| 30 ShellContentBrowserClient(); | 30 ShellContentBrowserClient(); |
| 31 ~ShellContentBrowserClient() override; | 31 ~ShellContentBrowserClient() override; |
| 32 | 32 |
| 33 // ContentBrowserClient overrides. | 33 // ContentBrowserClient overrides. |
| 34 BrowserMainParts* CreateBrowserMainParts( | 34 BrowserMainParts* CreateBrowserMainParts( |
| 35 const MainFunctionParams& parameters) override; | 35 const MainFunctionParams& parameters) override; |
| 36 bool DoesSiteRequireDedicatedProcess(BrowserContext* browser_context, | 36 bool DoesSiteRequireDedicatedProcess(BrowserContext* browser_context, |
| 37 const GURL& effective_site_url) override; | 37 const GURL& effective_site_url) override; |
| 38 bool IsHandledURL(const GURL& url) override; | 38 bool IsHandledURL(const GURL& url) override; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 52 content::StoragePartition* partition, | 52 content::StoragePartition* partition, |
| 53 const storage::OptionalQuotaSettingsCallback& callback) override; | 53 const storage::OptionalQuotaSettingsCallback& callback) override; |
| 54 void SelectClientCertificate( | 54 void SelectClientCertificate( |
| 55 WebContents* web_contents, | 55 WebContents* web_contents, |
| 56 net::SSLCertRequestInfo* cert_request_info, | 56 net::SSLCertRequestInfo* cert_request_info, |
| 57 net::CertificateList client_certs, | 57 net::CertificateList client_certs, |
| 58 std::unique_ptr<ClientCertificateDelegate> delegate) override; | 58 std::unique_ptr<ClientCertificateDelegate> delegate) override; |
| 59 SpeechRecognitionManagerDelegate* CreateSpeechRecognitionManagerDelegate() | 59 SpeechRecognitionManagerDelegate* CreateSpeechRecognitionManagerDelegate() |
| 60 override; | 60 override; |
| 61 net::NetLog* GetNetLog() override; | 61 net::NetLog* GetNetLog() override; |
| 62 bool ShouldSwapProcessesForRedirect(BrowserContext* browser_context, | |
| 63 const GURL& current_url, | |
| 64 const GURL& new_url) override; | |
| 65 DevToolsManagerDelegate* GetDevToolsManagerDelegate() override; | 62 DevToolsManagerDelegate* GetDevToolsManagerDelegate() override; |
| 66 | 63 |
| 67 void OpenURL(BrowserContext* browser_context, | 64 void OpenURL(BrowserContext* browser_context, |
| 68 const OpenURLParams& params, | 65 const OpenURLParams& params, |
| 69 const base::Callback<void(WebContents*)>& callback) override; | 66 const base::Callback<void(WebContents*)>& callback) override; |
| 70 | 67 |
| 71 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 68 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
| 72 void GetAdditionalMappedFilesForChildProcess( | 69 void GetAdditionalMappedFilesForChildProcess( |
| 73 const base::CommandLine& command_line, | 70 const base::CommandLine& command_line, |
| 74 int child_process_id, | 71 int child_process_id, |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 resource_dispatcher_host_delegate_; | 105 resource_dispatcher_host_delegate_; |
| 109 | 106 |
| 110 base::Closure select_client_certificate_callback_; | 107 base::Closure select_client_certificate_callback_; |
| 111 | 108 |
| 112 ShellBrowserMainParts* shell_browser_main_parts_; | 109 ShellBrowserMainParts* shell_browser_main_parts_; |
| 113 }; | 110 }; |
| 114 | 111 |
| 115 } // namespace content | 112 } // namespace content |
| 116 | 113 |
| 117 #endif // CONTENT_SHELL_BROWSER_SHELL_CONTENT_BROWSER_CLIENT_H_ | 114 #endif // CONTENT_SHELL_BROWSER_SHELL_CONTENT_BROWSER_CLIENT_H_ |
| OLD | NEW |