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

Unified Diff: content/public/common/page_zoom.h

Issue 224733018: Changes to content/ to facilitate new zoom extension API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments. Created 6 years, 8 months 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
Index: content/public/common/page_zoom.h
diff --git a/content/public/common/page_zoom.h b/content/public/common/page_zoom.h
index aa5e56a90711b089987afdbcf17eafd49ddf67e2..f026205908fae2f6bfb9fd9e372da8439ef28072 100644
--- a/content/public/common/page_zoom.h
+++ b/content/public/common/page_zoom.h
@@ -39,6 +39,27 @@ CONTENT_EXPORT bool ZoomValuesEqual(double value_a, double value_b);
CONTENT_EXPORT double ZoomLevelToZoomFactor(double zoom_level);
CONTENT_EXPORT double ZoomFactorToZoomLevel(double factor);
+// Defines how zoom changes are handled.
Charlie Reis 2014/04/10 18:57:48 This belongs at the top of the file since it affec
+// |kZoomModeDefault| results in default zoom behavior, i.e. zoom changes are
+// handled automatically and on a per-origin basis, meaning that other
+// tabs navigated to the same origin will also zoom.
+// |kZoomModeIsolated| results in zoom changes being handled automatically,
Charlie Reis 2014/04/10 18:57:48 kZoomModePerTab would be more accurate. Isolated
+// but on a per-tab basis. Tabs in this zoom mode will not be affected by
Charlie Reis 2014/04/10 18:57:48 Does this continue to apply after cross-origin or
+// zoom changes in other tabs, and vice versa.
+// |kZoomModeManual| overrides the automatic handling of zoom changes. The
+// NOTIFICATION_WEB_CONTENTS_ZOOM_CHANGE notification will still be
jam 2014/04/10 21:45:45 this seems like an old comment since you switched
+// dispatched, but the page will not actually be zoomed. These zoom changes
+// can be handled manually by listening for that notification. Zooming in
+// this mode is also on a per-tab basis.
+// |kZoomModeDisabled| disables all zooming in this tab. The tab will revert
+// to default (100%) zoom, and all attempted zoom changes will be ignored.
+enum ZoomMode {
+ kZoomModeDefault,
+ kZoomModeIsolated,
jam 2014/04/10 21:45:45 this really seems like the same concept of HostZoo
+ kZoomModeManual,
+ kZoomModeDisabled,
jam 2014/04/10 21:45:45 this appears to have the same problem as the above
+};
+
} // namespace content
#endif // CONTENT_PUBLIC_COMMON_PAGE_ZOOM_H_

Powered by Google App Engine
This is Rietveld 408576698