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

Unified Diff: content/public/browser/host_zoom_map.h

Issue 393133002: Migrate HostZoomMap to live in StoragePartition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments; patch for landing. Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/public/browser/browser_context.h ('k') | content/public/browser/storage_partition.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/host_zoom_map.h
diff --git a/content/public/browser/host_zoom_map.h b/content/public/browser/host_zoom_map.h
index e9e523e29f477696cc635f0b1376cccd87967648..653d24882fe0c5532e15524bf44129373748f276 100644
--- a/content/public/browser/host_zoom_map.h
+++ b/content/public/browser/host_zoom_map.h
@@ -20,6 +20,7 @@ namespace content {
class NavigationEntry;
class BrowserContext;
class ResourceContext;
+class SiteInstance;
class WebContents;
// Maps hostnames to custom zoom levels. Written on the UI thread and read on
@@ -61,6 +62,17 @@ class HostZoomMap {
CONTENT_EXPORT static HostZoomMap* GetDefaultForBrowserContext(
BrowserContext* browser_context);
+ // Returns the HostZoomMap associated with this SiteInstance. The SiteInstance
+ // may serve multiple WebContents, and the HostZoomMap is the same for all of
+ // these WebContents.
+ CONTENT_EXPORT static HostZoomMap* Get(SiteInstance* instance);
+
+ // Returns the HostZoomMap associated with this WebContent's main frame. If
+ // multiple WebContents share the same SiteInstance, then they share a single
+ // HostZoomMap.
+ CONTENT_EXPORT static HostZoomMap* GetForWebContents(
+ const WebContents* contents);
+
// Returns the current zoom level for the specified WebContents. May be
// temporary or host-specific.
CONTENT_EXPORT static double GetZoomLevel(const WebContents* web_contents);
« no previous file with comments | « content/public/browser/browser_context.h ('k') | content/public/browser/storage_partition.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698