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

Side by Side Diff: content/public/browser/browser_context.h

Issue 9416070: Move creation and ownership of HostZoomMap to content instead of having every embedder do this. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix mac/cros browsertests 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 | « content/browser/tab_contents/tab_contents.cc ('k') | content/public/browser/host_zoom_map.h » ('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 CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_
6 #define CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ 6 #define CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/hash_tables.h" 9 #include "base/hash_tables.h"
10 #include "base/supports_user_data.h" 10 #include "base/supports_user_data.h"
(...skipping 20 matching lines...) Expand all
31 class DatabaseTracker; 31 class DatabaseTracker;
32 } 32 }
33 33
34 class FilePath; 34 class FilePath;
35 class WebKitContext; 35 class WebKitContext;
36 36
37 namespace content { 37 namespace content {
38 38
39 class DownloadManager; 39 class DownloadManager;
40 class GeolocationPermissionContext; 40 class GeolocationPermissionContext;
41 class HostZoomMap;
42 class ResourceContext; 41 class ResourceContext;
43 class SpeechInputPreferences; 42 class SpeechInputPreferences;
44 43
45 // This class holds the context needed for a browsing session. 44 // This class holds the context needed for a browsing session.
46 // It lives on the UI thread. 45 // It lives on the UI thread.
47 class CONTENT_EXPORT BrowserContext : public base::SupportsUserData { 46 class CONTENT_EXPORT BrowserContext : public base::SupportsUserData {
48 public: 47 public:
49 // Getter for the QuotaManager associated with the given BrowserContext. 48 // Getter for the QuotaManager associated with the given BrowserContext.
50 static quota::QuotaManager* GetQuotaManager(BrowserContext* browser_context); 49 static quota::QuotaManager* GetQuotaManager(BrowserContext* browser_context);
51 static WebKitContext* GetWebKitContext(BrowserContext* browser_context); 50 static WebKitContext* GetWebKitContext(BrowserContext* browser_context);
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess( 88 virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess(
90 int renderer_child_id) = 0; 89 int renderer_child_id) = 0;
91 90
92 // Returns the request context for media resources asociated with this 91 // Returns the request context for media resources asociated with this
93 // context. 92 // context.
94 virtual net::URLRequestContextGetter* GetRequestContextForMedia() = 0; 93 virtual net::URLRequestContextGetter* GetRequestContextForMedia() = 0;
95 94
96 // Returns the resource context. 95 // Returns the resource context.
97 virtual ResourceContext* GetResourceContext() = 0; 96 virtual ResourceContext* GetResourceContext() = 0;
98 97
99 // Returns the Hostname <-> Zoom Level map for this context.
100 virtual HostZoomMap* GetHostZoomMap() = 0;
101
102 // Returns the geolocation permission context for this context. 98 // Returns the geolocation permission context for this context.
103 virtual GeolocationPermissionContext* GetGeolocationPermissionContext() = 0; 99 virtual GeolocationPermissionContext* GetGeolocationPermissionContext() = 0;
104 100
105 // Returns the speech input preferences. SpeechInputPreferences is a 101 // Returns the speech input preferences. SpeechInputPreferences is a
106 // ref counted class, so callers should take a reference if needed. 102 // ref counted class, so callers should take a reference if needed.
107 virtual SpeechInputPreferences* GetSpeechInputPreferences() = 0; 103 virtual SpeechInputPreferences* GetSpeechInputPreferences() = 0;
108 104
109 // Returns true if the last time this context was open it was exited cleanly. 105 // Returns true if the last time this context was open it was exited cleanly.
110 // This doesn't belong here; http://crbug.com/90737 106 // This doesn't belong here; http://crbug.com/90737
111 virtual bool DidLastSessionExitCleanly() = 0; 107 virtual bool DidLastSessionExitCleanly() = 0;
(...skipping 11 matching lines...) Expand all
123 struct hash<content::BrowserContext*> { 119 struct hash<content::BrowserContext*> {
124 std::size_t operator()(content::BrowserContext* const& p) const { 120 std::size_t operator()(content::BrowserContext* const& p) const {
125 return reinterpret_cast<std::size_t>(p); 121 return reinterpret_cast<std::size_t>(p);
126 } 122 }
127 }; 123 };
128 124
129 } // namespace BASE_HASH_NAMESPACE 125 } // namespace BASE_HASH_NAMESPACE
130 #endif 126 #endif
131 127
132 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ 128 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_
OLDNEW
« no previous file with comments | « content/browser/tab_contents/tab_contents.cc ('k') | content/public/browser/host_zoom_map.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698