1 // Copyright 2019 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef THIRD_PARTY_BLINK_PUBLIC_COMMON_PAGE_PAGE_ZOOM_H_
6 #define THIRD_PARTY_BLINK_PUBLIC_COMMON_PAGE_PAGE_ZOOM_H_
7 
8 #include "third_party/blink/public/common/common_export.h"
9 
10 namespace blink {
11 
12 // The minimum and maximum page zoom factors that are allowed.
13 BLINK_COMMON_EXPORT extern const double kMinimumPageZoomFactor;
14 BLINK_COMMON_EXPORT extern const double kMaximumPageZoomFactor;
15 
16 // Convert between page zoom factors and levels.
17 BLINK_COMMON_EXPORT double PageZoomLevelToZoomFactor(double zoom_level);
18 BLINK_COMMON_EXPORT double PageZoomFactorToZoomLevel(double factor);
19 
20 // Use this to compare page zoom factors and levels. It accounts for precision
21 // loss due to conversions back and forth.
22 BLINK_COMMON_EXPORT bool PageZoomValuesEqual(double value_a, double value_b);
23 
24 }  // namespace blink
25 
26 #endif  // THIRD_PARTY_BLINK_PUBLIC_COMMON_PAGE_PAGE_ZOOM_H_
27