Index: chrome/browser/ui/webui/settings/site_settings_handler.h |
diff --git a/chrome/browser/ui/webui/settings/site_settings_handler.h b/chrome/browser/ui/webui/settings/site_settings_handler.h |
index 753a08944582477c4b21933fa1a63ecb92f1c699..276057d75abcc07961494097ad3a70235182e51e 100644 |
--- a/chrome/browser/ui/webui/settings/site_settings_handler.h |
+++ b/chrome/browser/ui/webui/settings/site_settings_handler.h |
@@ -11,6 +11,7 @@ |
#include "chrome/browser/storage/storage_info_fetcher.h" |
#include "chrome/browser/ui/webui/settings/settings_page_ui_handler.h" |
#include "components/content_settings/core/browser/content_settings_observer.h" |
+#include "content/public/browser/host_zoom_map.h" |
#include "content/public/browser/notification_observer.h" |
#include "content/public/browser/notification_registrar.h" |
@@ -26,7 +27,7 @@ namespace settings { |
// Chrome "ContentSettings" settings page UI handler. |
class SiteSettingsHandler : public SettingsPageUIHandler, |
public content_settings::Observer, |
- public content::NotificationObserver { |
+ public content::NotificationObserver { |
public: |
explicit SiteSettingsHandler(Profile* profile); |
~SiteSettingsHandler() override; |
@@ -51,12 +52,16 @@ class SiteSettingsHandler : public SettingsPageUIHandler, |
const content::NotificationSource& source, |
const content::NotificationDetails& details) override; |
+ // content::HostZoomMap subscription. |
+ void OnZoomLevelChanged(const content::HostZoomMap::ZoomLevelChange& change); |
+ |
private: |
friend class SiteSettingsHandlerTest; |
FRIEND_TEST_ALL_PREFIXES(SiteSettingsHandlerTest, GetAndSetDefault); |
FRIEND_TEST_ALL_PREFIXES(SiteSettingsHandlerTest, Origins); |
FRIEND_TEST_ALL_PREFIXES(SiteSettingsHandlerTest, Patterns); |
FRIEND_TEST_ALL_PREFIXES(SiteSettingsHandlerTest, Incognito); |
+ FRIEND_TEST_ALL_PREFIXES(SiteSettingsHandlerTest, ZoomLevels); |
// Asynchronously fetches the usage for a given origin. Replies back with |
// OnGetUsageInfo above. |
@@ -91,10 +96,23 @@ class SiteSettingsHandler : public SettingsPageUIHandler, |
// Notifies the JS side whether incognito is enabled. |
void SendIncognitoStatus(Profile* profile, bool was_destroyed); |
+ // Handles the request for a list of all zoom levels. |
+ void HandleFetchZoomLevels(const base::ListValue* args); |
+ |
+ // Sends the zoom level list down to the web ui. |
+ void SendZoomLevels(); |
+ |
+ // Removes a particular zoom level for a given host. |
+ void HandleRemoveZoomLevel(const base::ListValue* args); |
+ |
Profile* profile_; |
content::NotificationRegistrar notification_registrar_; |
+ // Keeps track of events related to zooming. |
+ std::unique_ptr<content::HostZoomMap::Subscription> |
+ host_zoom_map_subscription_; |
+ |
// The host for which to fetch usage. |
std::string usage_host_; |