Clarify and update GN build flags docs.
[chromium-blink-merge.git] / components / ui / zoom / page_zoom.h
blob1c4de10a33580ed2d2d3e44abb6271b4370bf503
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_
8 #include <vector>
10 #include "base/macros.h"
11 #include "content/public/common/page_zoom.h"
13 namespace content {
14 class WebContents;
17 namespace ui_zoom {
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.
23 class PageZoom {
24 public:
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
27 // represented.)
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
32 // represented.)
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);
38 private:
39 // We don't expect (currently) to create instances of this class.
40 PageZoom() {}
41 DISALLOW_COPY_AND_ASSIGN(PageZoom);
44 } // namespace ui_zoom
46 #endif // COMPONENTS_UI_ZOOM_PAGE_ZOOM_H_