| 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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 double level) = 0; | 157 double level) = 0; |
| 158 | 158 |
| 159 // Clears the temporary zoom level stored for this WebContents. | 159 // Clears the temporary zoom level stored for this WebContents. |
| 160 // | 160 // |
| 161 // This should only be called on the UI thread. | 161 // This should only be called on the UI thread. |
| 162 virtual void ClearTemporaryZoomLevel(int render_process_id, | 162 virtual void ClearTemporaryZoomLevel(int render_process_id, |
| 163 int render_view_id) = 0; | 163 int render_view_id) = 0; |
| 164 | 164 |
| 165 // Get/Set the default zoom level for pages that don't override it. | 165 // Get/Set the default zoom level for pages that don't override it. |
| 166 virtual double GetDefaultZoomLevel() const = 0; | 166 virtual double GetDefaultZoomLevel() const = 0; |
| 167 virtual void SetDefaultZoomLevel(double level) = 0;; | 167 virtual void SetDefaultZoomLevel(double level) = 0; |
| 168 | 168 |
| 169 typedef base::Callback<void(const ZoomLevelChange&)> ZoomLevelChangedCallback; | 169 typedef base::Callback<void(const ZoomLevelChange&)> ZoomLevelChangedCallback; |
| 170 typedef base::CallbackList<void(const ZoomLevelChange&)>::Subscription | 170 typedef base::CallbackList<void(const ZoomLevelChange&)>::Subscription |
| 171 Subscription; | 171 Subscription; |
| 172 // Add and remove zoom level changed callbacks. | 172 // Add and remove zoom level changed callbacks. |
| 173 virtual scoped_ptr<Subscription> AddZoomLevelChangedCallback( | 173 virtual scoped_ptr<Subscription> AddZoomLevelChangedCallback( |
| 174 const ZoomLevelChangedCallback& callback) = 0; | 174 const ZoomLevelChangedCallback& callback) = 0; |
| 175 | 175 |
| 176 protected: | 176 protected: |
| 177 virtual ~HostZoomMap() {} | 177 virtual ~HostZoomMap() {} |
| 178 }; | 178 }; |
| 179 | 179 |
| 180 } // namespace content | 180 } // namespace content |
| 181 | 181 |
| 182 #endif // CONTENT_PUBLIC_BROWSER_HOST_ZOOM_MAP_H_ | 182 #endif // CONTENT_PUBLIC_BROWSER_HOST_ZOOM_MAP_H_ |
| OLD | NEW |