| 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 int render_process_id) OVERRIDE; | 144 int render_process_id) OVERRIDE; |
| 144 virtual std::string GetWorkerProcessTitle( | 145 virtual std::string GetWorkerProcessTitle( |
| 145 const GURL& url, content::ResourceContext* context) OVERRIDE; | 146 const GURL& url, content::ResourceContext* context) OVERRIDE; |
| 146 virtual void ResourceDispatcherHostCreated() OVERRIDE; | 147 virtual void ResourceDispatcherHostCreated() OVERRIDE; |
| 147 virtual content::SpeechInputManagerDelegate* | 148 virtual content::SpeechInputManagerDelegate* |
| 148 GetSpeechInputManagerDelegate() OVERRIDE; | 149 GetSpeechInputManagerDelegate() OVERRIDE; |
| 149 virtual ui::Clipboard* GetClipboard() OVERRIDE; | 150 virtual ui::Clipboard* GetClipboard() OVERRIDE; |
| 150 virtual net::NetLog* GetNetLog() OVERRIDE; | 151 virtual net::NetLog* GetNetLog() OVERRIDE; |
| 151 virtual content::AccessTokenStore* CreateAccessTokenStore() OVERRIDE; | 152 virtual content::AccessTokenStore* CreateAccessTokenStore() OVERRIDE; |
| 152 virtual bool IsFastShutdownPossible() OVERRIDE; | 153 virtual bool IsFastShutdownPossible() OVERRIDE; |
| 153 virtual void OverrideWebkitPrefs(RenderViewHost* rvh, | 154 virtual void OverrideWebkitPrefs(content::RenderViewHost* rvh, |
| 154 const GURL& url, | 155 const GURL& url, |
| 155 WebPreferences* prefs) OVERRIDE; | 156 WebPreferences* prefs) OVERRIDE; |
| 156 virtual void UpdateInspectorSetting(RenderViewHost* rvh, | 157 virtual void UpdateInspectorSetting(content::RenderViewHost* rvh, |
| 157 const std::string& key, | 158 const std::string& key, |
| 158 const std::string& value) OVERRIDE; | 159 const std::string& value) OVERRIDE; |
| 159 virtual void ClearInspectorSettings(RenderViewHost* rvh) OVERRIDE; | 160 virtual void ClearInspectorSettings(content::RenderViewHost* rvh) OVERRIDE; |
| 160 virtual void BrowserURLHandlerCreated(BrowserURLHandler* handler) OVERRIDE; | 161 virtual void BrowserURLHandlerCreated(BrowserURLHandler* handler) OVERRIDE; |
| 161 virtual void ClearCache(RenderViewHost* rvh) OVERRIDE; | 162 virtual void ClearCache(content::RenderViewHost* rvh) OVERRIDE; |
| 162 virtual void ClearCookies(RenderViewHost* rvh) OVERRIDE; | 163 virtual void ClearCookies(content::RenderViewHost* rvh) OVERRIDE; |
| 163 virtual FilePath GetDefaultDownloadDirectory() OVERRIDE; | 164 virtual FilePath GetDefaultDownloadDirectory() OVERRIDE; |
| 164 virtual std::string GetDefaultDownloadName() OVERRIDE; | 165 virtual std::string GetDefaultDownloadName() OVERRIDE; |
| 165 virtual bool AllowSocketAPI(content::BrowserContext* browser_context, | 166 virtual bool AllowSocketAPI(content::BrowserContext* browser_context, |
| 166 const GURL& url) OVERRIDE; | 167 const GURL& url) OVERRIDE; |
| 167 | 168 |
| 168 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 169 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
| 169 virtual int GetCrashSignalFD(const CommandLine& command_line) OVERRIDE; | 170 virtual int GetCrashSignalFD(const CommandLine& command_line) OVERRIDE; |
| 170 #endif | 171 #endif |
| 171 #if defined(OS_WIN) | 172 #if defined(OS_WIN) |
| 172 virtual const wchar_t* GetResourceDllName() OVERRIDE; | 173 virtual const wchar_t* GetResourceDllName() OVERRIDE; |
| 173 #endif | 174 #endif |
| 174 #if defined(USE_NSS) | 175 #if defined(USE_NSS) |
| 175 virtual | 176 virtual |
| 176 crypto::CryptoModuleBlockingPasswordDelegate* GetCryptoPasswordDelegate( | 177 crypto::CryptoModuleBlockingPasswordDelegate* GetCryptoPasswordDelegate( |
| 177 const GURL& url) OVERRIDE; | 178 const GURL& url) OVERRIDE; |
| 178 #endif | 179 #endif |
| 179 | 180 |
| 180 private: | 181 private: |
| 181 // Set of origins that can use TCP/UDP private APIs from NaCl. | 182 // Set of origins that can use TCP/UDP private APIs from NaCl. |
| 182 std::set<std::string> allowed_socket_origins_; | 183 std::set<std::string> allowed_socket_origins_; |
| 183 | 184 |
| 184 DISALLOW_COPY_AND_ASSIGN(ChromeContentBrowserClient); | 185 DISALLOW_COPY_AND_ASSIGN(ChromeContentBrowserClient); |
| 185 }; | 186 }; |
| 186 | 187 |
| 187 } // namespace chrome | 188 } // namespace chrome |
| 188 | 189 |
| 189 #endif // CHROME_BROWSER_CHROME_CONTENT_BROWSER_CLIENT_H_ | 190 #endif // CHROME_BROWSER_CHROME_CONTENT_BROWSER_CLIENT_H_ |
| OLD | NEW |