| 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 CHROME_BROWSER_CHROME_CONTENT_BROWSER_CLIENT_H_ | 5 #ifndef CHROME_BROWSER_CHROME_CONTENT_BROWSER_CLIENT_H_ |
| 6 #define CHROME_BROWSER_CHROME_CONTENT_BROWSER_CLIENT_H_ | 6 #define CHROME_BROWSER_CHROME_CONTENT_BROWSER_CLIENT_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| 11 | 11 |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.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 class QuotaPermissionContext; | 16 class QuotaPermissionContext; |
| 17 } | 17 } |
| 18 | 18 |
| 19 namespace chrome { | 19 namespace chrome { |
| 20 | 20 |
| 21 class ChromeContentBrowserClient : public content::ContentBrowserClient { | 21 class ChromeContentBrowserClient : public content::ContentBrowserClient { |
| 22 public: | 22 public: |
| 23 ChromeContentBrowserClient(); | 23 ChromeContentBrowserClient(); |
| 24 virtual ~ChromeContentBrowserClient(); | 24 virtual ~ChromeContentBrowserClient(); |
| 25 | 25 |
| 26 virtual content::BrowserMainParts* CreateBrowserMainParts( | 26 virtual content::BrowserMainParts* CreateBrowserMainParts( |
| 27 const content::MainFunctionParams& parameters) OVERRIDE; | 27 const content::MainFunctionParams& parameters) OVERRIDE; |
| 28 virtual content::WebContentsView* CreateWebContentsView( | 28 virtual content::WebContentsView* CreateWebContentsView( |
| 29 content::WebContents* web_contents) OVERRIDE; | 29 content::WebContents* web_contents) OVERRIDE; |
| 30 virtual void RenderViewHostCreated(RenderViewHost* render_view_host) OVERRIDE; | 30 virtual void RenderViewHostCreated( |
| 31 content::RenderViewHost* render_view_host) OVERRIDE; |
| 31 virtual void RenderProcessHostCreated( | 32 virtual void RenderProcessHostCreated( |
| 32 content::RenderProcessHost* host) OVERRIDE; | 33 content::RenderProcessHost* host) OVERRIDE; |
| 33 virtual content::WebUIControllerFactory* GetWebUIControllerFactory() OVERRIDE; | 34 virtual content::WebUIControllerFactory* GetWebUIControllerFactory() OVERRIDE; |
| 34 virtual bool ShouldUseProcessPerSite(content::BrowserContext* browser_context, | 35 virtual bool ShouldUseProcessPerSite(content::BrowserContext* browser_context, |
| 35 const GURL& effective_url) OVERRIDE; | 36 const GURL& effective_url) OVERRIDE; |
| 36 virtual GURL GetEffectiveURL(content::BrowserContext* browser_context, | 37 virtual GURL GetEffectiveURL(content::BrowserContext* browser_context, |
| 37 const GURL& url) OVERRIDE; | 38 const GURL& url) OVERRIDE; |
| 38 virtual bool IsHandledURL(const GURL& url) OVERRIDE; | 39 virtual bool IsHandledURL(const GURL& url) OVERRIDE; |
| 39 virtual bool IsSuitableHost(content::RenderProcessHost* process_host, | 40 virtual bool IsSuitableHost(content::RenderProcessHost* process_host, |
| 40 const GURL& url) OVERRIDE; | 41 const GURL& url) OVERRIDE; |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 int render_process_id) OVERRIDE; | 143 int render_process_id) OVERRIDE; |
| 143 virtual std::string GetWorkerProcessTitle( | 144 virtual std::string GetWorkerProcessTitle( |
| 144 const GURL& url, content::ResourceContext* context) OVERRIDE; | 145 const GURL& url, content::ResourceContext* context) OVERRIDE; |
| 145 virtual void ResourceDispatcherHostCreated() OVERRIDE; | 146 virtual void ResourceDispatcherHostCreated() OVERRIDE; |
| 146 virtual content::SpeechInputManagerDelegate* | 147 virtual content::SpeechInputManagerDelegate* |
| 147 GetSpeechInputManagerDelegate() OVERRIDE; | 148 GetSpeechInputManagerDelegate() OVERRIDE; |
| 148 virtual ui::Clipboard* GetClipboard() OVERRIDE; | 149 virtual ui::Clipboard* GetClipboard() OVERRIDE; |
| 149 virtual net::NetLog* GetNetLog() OVERRIDE; | 150 virtual net::NetLog* GetNetLog() OVERRIDE; |
| 150 virtual content::AccessTokenStore* CreateAccessTokenStore() OVERRIDE; | 151 virtual content::AccessTokenStore* CreateAccessTokenStore() OVERRIDE; |
| 151 virtual bool IsFastShutdownPossible() OVERRIDE; | 152 virtual bool IsFastShutdownPossible() OVERRIDE; |
| 152 virtual void OverrideWebkitPrefs(RenderViewHost* rvh, | 153 virtual void OverrideWebkitPrefs(content::RenderViewHost* rvh, |
| 153 const GURL& url, | 154 const GURL& url, |
| 154 WebPreferences* prefs) OVERRIDE; | 155 WebPreferences* prefs) OVERRIDE; |
| 155 virtual void UpdateInspectorSetting(RenderViewHost* rvh, | 156 virtual void UpdateInspectorSetting(content::RenderViewHost* rvh, |
| 156 const std::string& key, | 157 const std::string& key, |
| 157 const std::string& value) OVERRIDE; | 158 const std::string& value) OVERRIDE; |
| 158 virtual void ClearInspectorSettings(RenderViewHost* rvh) OVERRIDE; | 159 virtual void ClearInspectorSettings(content::RenderViewHost* rvh) OVERRIDE; |
| 159 virtual void BrowserURLHandlerCreated(BrowserURLHandler* handler) OVERRIDE; | 160 virtual void BrowserURLHandlerCreated(BrowserURLHandler* handler) OVERRIDE; |
| 160 virtual void ClearCache(RenderViewHost* rvh) OVERRIDE; | 161 virtual void ClearCache(content::RenderViewHost* rvh) OVERRIDE; |
| 161 virtual void ClearCookies(RenderViewHost* rvh) OVERRIDE; | 162 virtual void ClearCookies(content::RenderViewHost* rvh) OVERRIDE; |
| 162 virtual FilePath GetDefaultDownloadDirectory() OVERRIDE; | 163 virtual FilePath GetDefaultDownloadDirectory() OVERRIDE; |
| 163 virtual std::string GetDefaultDownloadName() OVERRIDE; | 164 virtual std::string GetDefaultDownloadName() OVERRIDE; |
| 164 virtual bool AllowSocketAPI(content::BrowserContext* browser_context, | 165 virtual bool AllowSocketAPI(content::BrowserContext* browser_context, |
| 165 const GURL& url) OVERRIDE; | 166 const GURL& url) OVERRIDE; |
| 166 | 167 |
| 167 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 168 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
| 168 virtual int GetCrashSignalFD(const CommandLine& command_line) OVERRIDE; | 169 virtual int GetCrashSignalFD(const CommandLine& command_line) OVERRIDE; |
| 169 #endif | 170 #endif |
| 170 #if defined(OS_WIN) | 171 #if defined(OS_WIN) |
| 171 virtual const wchar_t* GetResourceDllName() OVERRIDE; | 172 virtual const wchar_t* GetResourceDllName() OVERRIDE; |
| 172 #endif | 173 #endif |
| 173 #if defined(USE_NSS) | 174 #if defined(USE_NSS) |
| 174 virtual | 175 virtual |
| 175 crypto::CryptoModuleBlockingPasswordDelegate* GetCryptoPasswordDelegate( | 176 crypto::CryptoModuleBlockingPasswordDelegate* GetCryptoPasswordDelegate( |
| 176 const GURL& url) OVERRIDE; | 177 const GURL& url) OVERRIDE; |
| 177 #endif | 178 #endif |
| 178 | 179 |
| 179 private: | 180 private: |
| 180 // Set of origins that can use TCP/UDP private APIs from NaCl. | 181 // Set of origins that can use TCP/UDP private APIs from NaCl. |
| 181 std::set<std::string> allowed_socket_origins_; | 182 std::set<std::string> allowed_socket_origins_; |
| 182 | 183 |
| 183 DISALLOW_COPY_AND_ASSIGN(ChromeContentBrowserClient); | 184 DISALLOW_COPY_AND_ASSIGN(ChromeContentBrowserClient); |
| 184 }; | 185 }; |
| 185 | 186 |
| 186 } // namespace chrome | 187 } // namespace chrome |
| 187 | 188 |
| 188 #endif // CHROME_BROWSER_CHROME_CONTENT_BROWSER_CLIENT_H_ | 189 #endif // CHROME_BROWSER_CHROME_CONTENT_BROWSER_CLIENT_H_ |
| OLD | NEW |