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

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

Issue 8528011: Page zoom improvements (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Tweak, Tweak Created 9 years, 1 month 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
===================================================================
--- content/public/common/page_zoom.h (revision 110556)
+++ content/public/common/page_zoom.h (working copy)
@@ -6,7 +6,10 @@
#define CONTENT_PUBLIC_COMMON_PAGE_ZOOM_H_
#pragma once
+#include <vector>
+
#include "base/basictypes.h"
+#include "content/common/content_export.h"
namespace content {
@@ -18,6 +21,28 @@
PAGE_ZOOM_IN = 1,
};
+// The minimum zoom factor permitted for a page. This is an alternative to
+// WebView::minTextSizeMultiplier.
+CONTENT_EXPORT extern const double kMinimumZoomFactor;
+
+// The maximum zoom factor permitted for a page. This is an alternative to
+// WebView::maxTextSizeMultiplier.
+CONTENT_EXPORT extern const double kMaximumZoomFactor;
+
+// Return a sorted vector of zoom factors. The vector will consist of preset
+// values along with a custom value (if the custom value is not already
+// represented.)
+CONTENT_EXPORT std::vector<double> PresetZoomFactors(double custom_factor);
+
+// Return a sorted vector of zoom levels. The vector will consist of preset
+// values along with a custom value (if the custom value is not already
+// represented.)
+CONTENT_EXPORT std::vector<double> PresetZoomLevels(double custom_level);
+
+// Test if two zoom values (either zoom factors or zoom levels) should be
+// considered equal.
+CONTENT_EXPORT bool ZoomValuesEqual(double value_a, double value_b);
+
} // namespace content
#endif // CONTENT_PUBLIC_COMMON_PAGE_ZOOM_H_

Powered by Google App Engine
This is Rietveld 408576698