Chromium Code Reviews| 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 1e32e79383702721f3128efef30a2e0fff8f82eb..2358428706cb2802eabbcc0493b1cd2ec7283d70 100644 |
| --- a/content/public/browser/host_zoom_map.h |
| +++ b/content/public/browser/host_zoom_map.h |
| @@ -15,6 +15,7 @@ |
| namespace content { |
| class BrowserContext; |
| +class HostZoomMapImpl; |
| class ResourceContext; |
| // Maps hostnames to custom zoom levels. Written on the UI thread and read on |
| @@ -25,6 +26,29 @@ class HostZoomMap { |
| CONTENT_EXPORT static HostZoomMap* GetForBrowserContext( |
| BrowserContext* browser_context); |
| + class Observer { |
|
jam
2013/01/24 01:28:35
nit: per c++ style guide, and convention, prefer t
Paweł Hajdan Jr.
2013/01/24 19:42:38
Done.
|
| + public: |
| + Observer(); |
| + explicit Observer(HostZoomMap* map); |
| + virtual ~Observer(); |
| + |
| + // Called when the zoom level changes. |host| is a string of the hostname |
| + // for which the zoom changed (empty string for temporary changes). |
| + virtual void OnZoomLevelChanged(const std::string& host) = 0; |
| + |
| + protected: |
| + void Observe(HostZoomMap* map); |
| + |
| + private: |
| + friend class HostZoomMapImpl; |
| + |
| + void HostZoomMapImplDestroyed(); |
| + |
| + HostZoomMapImpl* host_zoom_map_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(Observer); |
| + }; |
| + |
| // Copy the zoom levels from the given map. Can only be called on the UI |
| // thread. |
| virtual void CopyFrom(HostZoomMap* copy) = 0; |