| 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 e65b443d2b4a64590e3aca78ef3ba45c3a0873d5..5ad89e9cfc0d4f96340f246df0f56ac9feda81d2 100644
|
| --- a/content/public/browser/host_zoom_map.h
|
| +++ b/content/public/browser/host_zoom_map.h
|
| @@ -13,11 +13,13 @@
|
| #include "base/callback.h"
|
| #include "base/callback_list.h"
|
| #include "content/common/content_export.h"
|
| +#include "url/gurl.h"
|
|
|
| namespace content {
|
|
|
| class BrowserContext;
|
| class ResourceContext;
|
| +class SiteInstance;
|
| class WebContents;
|
|
|
| // Maps hostnames to custom zoom levels. Written on the UI thread and read on
|
| @@ -39,6 +41,7 @@ class HostZoomMap {
|
| // pair.
|
| ZOOM_CHANGED_TEMPORARY_ZOOM, // Temporary zoom change for specific
|
| // renderer, no scheme/host is specified.
|
| + ZOOM_CHANGED_DEFAULT_ZOOM_LEVEL, // Notify when default level changes.
|
| };
|
|
|
| // Structure used to notify about zoom changes. Host and/or scheme are empty
|
| @@ -52,9 +55,20 @@ class HostZoomMap {
|
|
|
| typedef std::vector<ZoomLevelChange> ZoomLevelVector;
|
|
|
| - CONTENT_EXPORT static HostZoomMap* GetForBrowserContext(
|
| + 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 WebContents. 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);
|
|
|