1 // Copyright 2015 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.
5 #ifndef COMPONENTS_UI_ZOOM_PAGE_ZOOM_H_
6 #define COMPONENTS_UI_ZOOM_PAGE_ZOOM_H_
10 #include "base/macros.h"
11 #include "content/public/common/page_zoom.h"
19 // This class provides a means of zooming pages according to a predetermined
20 // set of zoom levels/factors. In future, the static methods in this class
21 // can be made non-static, with PresetZoomX() being virtual, to allow clients
22 // to create custom sets of zoom levels.
25 // Return a sorted vector of zoom factors. The vector will consist of preset
26 // values along with a custom value (if the custom value is not already
28 static std::vector
<double> PresetZoomFactors(double custom_factor
);
30 // Return a sorted vector of zoom levels. The vector will consist of preset
31 // values along with a custom value (if the custom value is not already
33 static std::vector
<double> PresetZoomLevels(double custom_level
);
35 // Adjusts the zoom level of |web_contents|.
36 static void Zoom(content::WebContents
* web_contents
, content::PageZoom zoom
);
39 // We don't expect (currently) to create instances of this class.
41 DISALLOW_COPY_AND_ASSIGN(PageZoom
);
44 } // namespace ui_zoom
46 #endif // COMPONENTS_UI_ZOOM_PAGE_ZOOM_H_