Chromium Code Reviews| 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 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 130 // This should only be called on the UI thread. | 130 // This should only be called on the UI thread. |
| 131 virtual void SetZoomLevelForHostAndScheme(const std::string& scheme, | 131 virtual void SetZoomLevelForHostAndScheme(const std::string& scheme, |
| 132 const std::string& host, | 132 const std::string& host, |
| 133 double level) = 0; | 133 double level) = 0; |
| 134 | 134 |
| 135 // Returns whether the view manages its zoom level independently of other | 135 // Returns whether the view manages its zoom level independently of other |
| 136 // views displaying content from the same host. | 136 // views displaying content from the same host. |
| 137 virtual bool UsesTemporaryZoomLevel(int render_process_id, | 137 virtual bool UsesTemporaryZoomLevel(int render_process_id, |
| 138 int render_view_id) const = 0; | 138 int render_view_id) const = 0; |
| 139 | 139 |
| 140 // Returns the temporary zoom level that's only valid for the lifetime of | |
| 141 // the given WebContents (i.e. isn't saved and doesn't affect other | |
| 142 // WebContentses) if it exists, the default zoom level otherwise. | |
| 143 // | |
| 144 // This may be called on any thread. | |
| 145 virtual double GetTemporaryZoomLevel(int render_process_id, | |
|
Charlie Reis
2015/02/11 18:34:31
From the Content API guidelines:
http://www.chromi
wjmaclean
2015/02/11 20:29:34
Done.
| |
| 146 int render_view_id) const = 0; | |
|
Charlie Reis
2015/02/11 18:34:31
From the Content API guidelines:
http://www.chromi
wjmaclean
2015/02/11 20:29:34
Done.
| |
| 147 | |
| 140 // Sets the temporary zoom level that's only valid for the lifetime of this | 148 // Sets the temporary zoom level that's only valid for the lifetime of this |
| 141 // WebContents. | 149 // WebContents. |
| 142 // | 150 // |
| 143 // This should only be called on the UI thread. | 151 // This should only be called on the UI thread. |
| 144 virtual void SetTemporaryZoomLevel(int render_process_id, | 152 virtual void SetTemporaryZoomLevel(int render_process_id, |
| 145 int render_view_id, | 153 int render_view_id, |
| 146 double level) = 0; | 154 double level) = 0; |
| 147 | 155 |
| 148 // Clears the temporary zoom level stored for this WebContents. | 156 // Clears the temporary zoom level stored for this WebContents. |
| 149 // | 157 // |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 162 virtual scoped_ptr<Subscription> AddZoomLevelChangedCallback( | 170 virtual scoped_ptr<Subscription> AddZoomLevelChangedCallback( |
| 163 const ZoomLevelChangedCallback& callback) = 0; | 171 const ZoomLevelChangedCallback& callback) = 0; |
| 164 | 172 |
| 165 protected: | 173 protected: |
| 166 virtual ~HostZoomMap() {} | 174 virtual ~HostZoomMap() {} |
| 167 }; | 175 }; |
| 168 | 176 |
| 169 } // namespace content | 177 } // namespace content |
| 170 | 178 |
| 171 #endif // CONTENT_PUBLIC_BROWSER_HOST_ZOOM_MAP_H_ | 179 #endif // CONTENT_PUBLIC_BROWSER_HOST_ZOOM_MAP_H_ |
| OLD | NEW |