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 443da67359cad810b3a6c0c9e0df46fc7c45c954..623088948520fb19f5158f36095d11430a09678f 100644 |
--- a/chrome/browser/ui/webui/settings/site_settings_handler.h |
+++ b/chrome/browser/ui/webui/settings/site_settings_handler.h |
@@ -12,6 +12,7 @@ |
#include "base/scoped_observer.h" |
#include "chrome/browser/storage/storage_info_fetcher.h" |
#include "chrome/browser/ui/webui/settings/settings_page_ui_handler.h" |
+#include "chrome/browser/ui/zoom/chrome_zoom_level_prefs.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" |
@@ -54,6 +55,8 @@ class SiteSettingsHandler : public SettingsPageUIHandler, |
const content::NotificationSource& source, |
const content::NotificationDetails& details) override; |
+ // ChromeZoomLevelPrefs::DefaultZoomScopeSubscription subscription. |
+ void OnZoomScopeChanged(); |
// content::HostZoomMap subscription. |
void OnZoomLevelChanged(const content::HostZoomMap::ZoomLevelChange& change); |
@@ -65,6 +68,7 @@ class SiteSettingsHandler : public SettingsPageUIHandler, |
FRIEND_TEST_ALL_PREFIXES(SiteSettingsHandlerTest, Patterns); |
FRIEND_TEST_ALL_PREFIXES(SiteSettingsHandlerTest, Incognito); |
FRIEND_TEST_ALL_PREFIXES(SiteSettingsHandlerTest, ZoomLevels); |
+ FRIEND_TEST_ALL_PREFIXES(SiteSettingsHandlerTest, ZoomScope); |
// Asynchronously fetches the usage for a given origin. Replies back with |
// OnGetUsageInfo above. |
@@ -102,12 +106,21 @@ class SiteSettingsHandler : public SettingsPageUIHandler, |
// Notifies the JS side whether incognito is enabled. |
void SendIncognitoStatus(Profile* profile, bool was_destroyed); |
+ // Handles the request for the default zoom scope. |
+ void HandleFetchZoomScope(const base::ListValue* args); |
+ |
+ // Sends the default zoom scope down to the web ui. |
+ void SendZoomScope(); |
+ |
// 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(); |
+ // Sets the default zoom scope. |
+ void HandleSetZoomScopeIsPerOrigin(const base::ListValue* args); |
+ |
// Removes a particular zoom level for a given host. |
void HandleRemoveZoomLevel(const base::ListValue* args); |
@@ -115,6 +128,9 @@ class SiteSettingsHandler : public SettingsPageUIHandler, |
content::NotificationRegistrar notification_registrar_; |
+ // Keeps track of the default zoom scope. |
+ std::unique_ptr<ChromeZoomLevelPrefs::DefaultZoomScopeSubscription> |
+ default_zoom_scope_subscription_; |
// Keeps track of events related to zooming. |
std::unique_ptr<content::HostZoomMap::Subscription> |
host_zoom_map_subscription_; |