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

Side by Side Diff: components/zoom/page_zoom.h

Issue 2019423005: Move //components/ui/zoom to top-level under //components (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 months 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 unified diff | Download patch
« no previous file with comments | « components/zoom/OWNERS ('k') | components/zoom/page_zoom.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_UI_ZOOM_PAGE_ZOOM_H_ 5 #ifndef COMPONENTS_ZOOM_PAGE_ZOOM_H_
6 #define COMPONENTS_UI_ZOOM_PAGE_ZOOM_H_ 6 #define COMPONENTS_ZOOM_PAGE_ZOOM_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "content/public/common/page_zoom.h" 11 #include "content/public/common/page_zoom.h"
12 12
13 namespace content { 13 namespace content {
14 class WebContents; 14 class WebContents;
15 } 15 }
16 16
17 namespace ui_zoom { 17 namespace zoom {
18 18
19 // This class provides a means of zooming pages according to a predetermined 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 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 21 // can be made non-static, with PresetZoomX() being virtual, to allow clients
22 // to create custom sets of zoom levels. 22 // to create custom sets of zoom levels.
23 class PageZoom { 23 class PageZoom {
24 public: 24 public:
25 // Return a sorted vector of zoom factors. The vector will consist of preset 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 26 // values along with a custom value (if the custom value is not already
27 // represented.) 27 // represented.)
28 static std::vector<double> PresetZoomFactors(double custom_factor); 28 static std::vector<double> PresetZoomFactors(double custom_factor);
29 29
30 // Return a sorted vector of zoom levels. The vector will consist of preset 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 31 // values along with a custom value (if the custom value is not already
32 // represented.) 32 // represented.)
33 static std::vector<double> PresetZoomLevels(double custom_level); 33 static std::vector<double> PresetZoomLevels(double custom_level);
34 34
35 // Adjusts the zoom level of |web_contents|. 35 // Adjusts the zoom level of |web_contents|.
36 static void Zoom(content::WebContents* web_contents, content::PageZoom zoom); 36 static void Zoom(content::WebContents* web_contents, content::PageZoom zoom);
37 37
38 private: 38 private:
39 // We don't expect (currently) to create instances of this class. 39 // We don't expect (currently) to create instances of this class.
40 PageZoom() {} 40 PageZoom() {}
41 DISALLOW_COPY_AND_ASSIGN(PageZoom); 41 DISALLOW_COPY_AND_ASSIGN(PageZoom);
42 }; 42 };
43 43
44 } // namespace ui_zoom 44 } // namespace zoom
45 45
46 #endif // COMPONENTS_UI_ZOOM_PAGE_ZOOM_H_ 46 #endif // COMPONENTS_ZOOM_PAGE_ZOOM_H_
OLDNEW
« no previous file with comments | « components/zoom/OWNERS ('k') | components/zoom/page_zoom.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698