OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_PUBLIC_BROWSER_HOST_ZOOM_MAP_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_HOST_ZOOM_MAP_H_ |
6 #define CONTENT_PUBLIC_BROWSER_HOST_ZOOM_MAP_H_ | 6 #define CONTENT_PUBLIC_BROWSER_HOST_ZOOM_MAP_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
(...skipping 27 matching lines...) Expand all Loading... |
38 // negative (to zoom out). | 38 // negative (to zoom out). |
39 // | 39 // |
40 // This may be called on any thread. | 40 // This may be called on any thread. |
41 virtual double GetZoomLevel(const std::string& host) const = 0; | 41 virtual double GetZoomLevel(const std::string& host) const = 0; |
42 | 42 |
43 // Sets the zoom level for the host or spec for a given url to |level|. If | 43 // Sets the zoom level for the host or spec for a given url to |level|. If |
44 // the level matches the current default zoom level, the host is erased | 44 // the level matches the current default zoom level, the host is erased |
45 // from the saved preferences; otherwise the new value is written out. | 45 // from the saved preferences; otherwise the new value is written out. |
46 // | 46 // |
47 // This should only be called on the UI thread. | 47 // This should only be called on the UI thread. |
48 virtual void SetZoomLevel(std::string host, double level) = 0; | 48 virtual void SetZoomLevel(const std::string& host, double level) = 0; |
49 | 49 |
50 // Get/Set the default zoom level for pages that don't override it. | 50 // Get/Set the default zoom level for pages that don't override it. |
51 virtual double GetDefaultZoomLevel() const = 0; | 51 virtual double GetDefaultZoomLevel() const = 0; |
52 virtual void SetDefaultZoomLevel(double level) = 0;; | 52 virtual void SetDefaultZoomLevel(double level) = 0;; |
53 | 53 |
54 protected: | 54 protected: |
55 virtual ~HostZoomMap() {} | 55 virtual ~HostZoomMap() {} |
56 }; | 56 }; |
57 | 57 |
58 } // namespace content | 58 } // namespace content |
59 | 59 |
60 #endif // CONTENT_PUBLIC_BROWSER_HOST_ZOOM_MAP_H_ | 60 #endif // CONTENT_PUBLIC_BROWSER_HOST_ZOOM_MAP_H_ |
OLD | NEW |