Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(339)

Side by Side Diff: chrome/browser/chrome_content_browser_client.h

Issue 9379002: Move socket API restriction check to browser process (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/chrome_content_browser_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <string> 10 #include <string>
10 11
11 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
12 #include "content/public/browser/content_browser_client.h" 13 #include "content/public/browser/content_browser_client.h"
13 14
14 namespace chrome { 15 namespace chrome {
15 16
16 class ChromeContentBrowserClient : public content::ContentBrowserClient { 17 class ChromeContentBrowserClient : public content::ContentBrowserClient {
17 public: 18 public:
19 ChromeContentBrowserClient();
20 virtual ~ChromeContentBrowserClient();
21
18 virtual content::BrowserMainParts* CreateBrowserMainParts( 22 virtual content::BrowserMainParts* CreateBrowserMainParts(
19 const content::MainFunctionParams& parameters) OVERRIDE; 23 const content::MainFunctionParams& parameters) OVERRIDE;
20 virtual content::WebContentsView* CreateWebContentsView( 24 virtual content::WebContentsView* CreateWebContentsView(
21 content::WebContents* web_contents) OVERRIDE; 25 content::WebContents* web_contents) OVERRIDE;
22 virtual void RenderViewHostCreated(RenderViewHost* render_view_host) OVERRIDE; 26 virtual void RenderViewHostCreated(RenderViewHost* render_view_host) OVERRIDE;
23 virtual void RenderProcessHostCreated( 27 virtual void RenderProcessHostCreated(
24 content::RenderProcessHost* host) OVERRIDE; 28 content::RenderProcessHost* host) OVERRIDE;
25 virtual content::WebUIControllerFactory* GetWebUIControllerFactory() OVERRIDE; 29 virtual content::WebUIControllerFactory* GetWebUIControllerFactory() OVERRIDE;
26 virtual bool ShouldUseProcessPerSite(content::BrowserContext* browser_context, 30 virtual bool ShouldUseProcessPerSite(content::BrowserContext* browser_context,
27 const GURL& effective_url) OVERRIDE; 31 const GURL& effective_url) OVERRIDE;
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 WebPreferences* prefs) OVERRIDE; 138 WebPreferences* prefs) OVERRIDE;
135 virtual void UpdateInspectorSetting(RenderViewHost* rvh, 139 virtual void UpdateInspectorSetting(RenderViewHost* rvh,
136 const std::string& key, 140 const std::string& key,
137 const std::string& value) OVERRIDE; 141 const std::string& value) OVERRIDE;
138 virtual void ClearInspectorSettings(RenderViewHost* rvh) OVERRIDE; 142 virtual void ClearInspectorSettings(RenderViewHost* rvh) OVERRIDE;
139 virtual void BrowserURLHandlerCreated(BrowserURLHandler* handler) OVERRIDE; 143 virtual void BrowserURLHandlerCreated(BrowserURLHandler* handler) OVERRIDE;
140 virtual void ClearCache(RenderViewHost* rvh) OVERRIDE; 144 virtual void ClearCache(RenderViewHost* rvh) OVERRIDE;
141 virtual void ClearCookies(RenderViewHost* rvh) OVERRIDE; 145 virtual void ClearCookies(RenderViewHost* rvh) OVERRIDE;
142 virtual FilePath GetDefaultDownloadDirectory() OVERRIDE; 146 virtual FilePath GetDefaultDownloadDirectory() OVERRIDE;
143 virtual std::string GetDefaultDownloadName() OVERRIDE; 147 virtual std::string GetDefaultDownloadName() OVERRIDE;
148 virtual bool AllowSocketAPI(const GURL& url) OVERRIDE;
144 149
145 #if defined(OS_POSIX) && !defined(OS_MACOSX) 150 #if defined(OS_POSIX) && !defined(OS_MACOSX)
146 virtual int GetCrashSignalFD(const CommandLine& command_line) OVERRIDE; 151 virtual int GetCrashSignalFD(const CommandLine& command_line) OVERRIDE;
147 #endif 152 #endif
148 #if defined(OS_WIN) 153 #if defined(OS_WIN)
149 virtual const wchar_t* GetResourceDllName() OVERRIDE; 154 virtual const wchar_t* GetResourceDllName() OVERRIDE;
150 #endif 155 #endif
151 #if defined(USE_NSS) 156 #if defined(USE_NSS)
152 virtual 157 virtual
153 crypto::CryptoModuleBlockingPasswordDelegate* GetCryptoPasswordDelegate( 158 crypto::CryptoModuleBlockingPasswordDelegate* GetCryptoPasswordDelegate(
154 const GURL& url) OVERRIDE; 159 const GURL& url) OVERRIDE;
155 #endif 160 #endif
161
162 private:
163 // Set of origins that can use TCP/UDP private APIs from NaCl.
164 std::set<std::string> allowed_socket_origins_;
165
166 DISALLOW_COPY_AND_ASSIGN(ChromeContentBrowserClient);
156 }; 167 };
157 168
158 } // namespace chrome 169 } // namespace chrome
159 170
160 #endif // CHROME_BROWSER_CHROME_CONTENT_BROWSER_CLIENT_H_ 171 #endif // CHROME_BROWSER_CHROME_CONTENT_BROWSER_CLIENT_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chrome_content_browser_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698