Chromium Code Reviews| 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..57e3651ab165ee38f5b970bcd02eb00d14c2d264 100644 |
| --- a/content/public/common/page_zoom.h |
| +++ b/content/public/common/page_zoom.h |
| @@ -5,6 +5,10 @@ |
| #ifndef CONTENT_PUBLIC_COMMON_PAGE_ZOOM_H_ |
| #define CONTENT_PUBLIC_COMMON_PAGE_ZOOM_H_ |
| +#include <string> |
|
Fady Samuel
2014/04/10 17:09:03
Remove these unnecessary includes.
paulmeyer
2014/04/10 17:24:37
Done.
|
| + |
| +#include "base/logging.h" |
| +#include "base/values.h" |
| #include "content/common/content_export.h" |
| namespace content { |
| @@ -39,6 +43,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. |
| +// |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, |
| +// but on a per-tab basis. Tabs in this zoom mode will not be affected by |
| +// 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 |
| +// 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, |
| + kZoomModeManual, |
| + kZoomModeDisabled, |
| +}; |
| + |
| } // namespace content |
| #endif // CONTENT_PUBLIC_COMMON_PAGE_ZOOM_H_ |