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

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

Issue 10831116: Move SessionStorageNamespace entirely into NavigationController and support StoragePartitions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merged ToT Created 8 years, 4 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 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/compiler_specific.h" 13 #include "base/compiler_specific.h"
14 #include "content/public/browser/content_browser_client.h" 14 #include "content/public/browser/content_browser_client.h"
15 15
16 namespace content { 16 namespace content {
17 class QuotaPermissionContext; 17 class QuotaPermissionContext;
18 } 18 }
19 19
20 namespace extensions {
21 class Extension;
22 }
23
20 class PrefService; 24 class PrefService;
21 25
22 namespace chrome { 26 namespace chrome {
23 27
24 class ChromeContentBrowserClient : public content::ContentBrowserClient { 28 class ChromeContentBrowserClient : public content::ContentBrowserClient {
25 public: 29 public:
26 ChromeContentBrowserClient(); 30 ChromeContentBrowserClient();
27 virtual ~ChromeContentBrowserClient(); 31 virtual ~ChromeContentBrowserClient();
28 32
29 static void RegisterUserPrefs(PrefService* prefs); 33 static void RegisterUserPrefs(PrefService* prefs);
30 34
31 virtual content::BrowserMainParts* CreateBrowserMainParts( 35 virtual content::BrowserMainParts* CreateBrowserMainParts(
32 const content::MainFunctionParams& parameters) OVERRIDE; 36 const content::MainFunctionParams& parameters) OVERRIDE;
33 virtual content::WebContentsView* OverrideCreateWebContentsView( 37 virtual content::WebContentsView* OverrideCreateWebContentsView(
34 content::WebContents* web_contents, 38 content::WebContents* web_contents,
35 content::RenderViewHostDelegateView** render_view_host_delegate_view) 39 content::RenderViewHostDelegateView** render_view_host_delegate_view)
36 OVERRIDE; 40 OVERRIDE;
37 virtual std::string GetStoragePartitionIdForChildProcess( 41 virtual std::string GetStoragePartitionIdForChildProcess(
38 content::BrowserContext* browser_context, 42 content::BrowserContext* browser_context,
39 int child_process_id) OVERRIDE; 43 int child_process_id) OVERRIDE;
44 virtual std::string GetStoragePartitionIdForSiteInstance(
45 content::BrowserContext* browser_context,
46 content::SiteInstance* instance) OVERRIDE;
47 virtual bool IsValidStoragePartitionId(
48 content::BrowserContext* browser_context,
49 const std::string& partition_id) OVERRIDE;
40 virtual content::WebContentsViewDelegate* GetWebContentsViewDelegate( 50 virtual content::WebContentsViewDelegate* GetWebContentsViewDelegate(
41 content::WebContents* web_contents) OVERRIDE; 51 content::WebContents* web_contents) OVERRIDE;
42 virtual void RenderViewHostCreated( 52 virtual void RenderViewHostCreated(
43 content::RenderViewHost* render_view_host) OVERRIDE; 53 content::RenderViewHost* render_view_host) OVERRIDE;
44 virtual void RenderProcessHostCreated( 54 virtual void RenderProcessHostCreated(
45 content::RenderProcessHost* host) OVERRIDE; 55 content::RenderProcessHost* host) OVERRIDE;
46 virtual void BrowserChildProcessHostCreated( 56 virtual void BrowserChildProcessHostCreated(
47 content::BrowserChildProcessHost* host) OVERRIDE; 57 content::BrowserChildProcessHost* host) OVERRIDE;
48 virtual content::WebUIControllerFactory* GetWebUIControllerFactory() OVERRIDE; 58 virtual content::WebUIControllerFactory* GetWebUIControllerFactory() OVERRIDE;
49 virtual bool ShouldUseProcessPerSite(content::BrowserContext* browser_context, 59 virtual bool ShouldUseProcessPerSite(content::BrowserContext* browser_context,
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 #endif 217 #endif
208 218
209 // Notification that the application locale has changed. This allows us to 219 // Notification that the application locale has changed. This allows us to
210 // update our I/O thread cache of this value. 220 // update our I/O thread cache of this value.
211 void SetApplicationLocale(const std::string& locale); 221 void SetApplicationLocale(const std::string& locale);
212 222
213 private: 223 private:
214 // Sets io_thread_application_locale_ to the given value. 224 // Sets io_thread_application_locale_ to the given value.
215 void SetApplicationLocaleOnIOThread(const std::string& locale); 225 void SetApplicationLocaleOnIOThread(const std::string& locale);
216 226
227 // Helper function for getting the storage partition id from an Extension
228 // object.
229 std::string GetStoragePartitionIdForExtension(
230 content::BrowserContext* browser_context,
231 const extensions::Extension* extension);
232
217 // Set of origins that can use TCP/UDP private APIs from NaCl. 233 // Set of origins that can use TCP/UDP private APIs from NaCl.
218 std::set<std::string> allowed_socket_origins_; 234 std::set<std::string> allowed_socket_origins_;
219 235
220 // Cached version of the locale so we can return the locale on the I/O 236 // Cached version of the locale so we can return the locale on the I/O
221 // thread. 237 // thread.
222 std::string io_thread_application_locale_; 238 std::string io_thread_application_locale_;
223 239
224 DISALLOW_COPY_AND_ASSIGN(ChromeContentBrowserClient); 240 DISALLOW_COPY_AND_ASSIGN(ChromeContentBrowserClient);
225 }; 241 };
226 242
227 } // namespace chrome 243 } // namespace chrome
228 244
229 #endif // CHROME_BROWSER_CHROME_CONTENT_BROWSER_CLIENT_H_ 245 #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