| 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..6f3f6bf88620a1fc2d203dc1662d4bd3e1cab7d7 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>
|
| +
|
| +#include "base/logging.h"
|
| +#include "base/values.h"
|
| #include "content/common/content_export.h"
|
|
|
| namespace content {
|
| @@ -39,6 +43,34 @@ 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,
|
| +};
|
| +
|
| +// Details of a zoom change.
|
| +struct ZoomChangeDetails {
|
| + double old_zoom_level;
|
| + double new_zoom_level;
|
| + content::ZoomMode zoom_mode;
|
| +};
|
| +
|
| } // namespace content
|
|
|
| #endif // CONTENT_PUBLIC_COMMON_PAGE_ZOOM_H_
|
|
|