| 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 <memory> |
| 9 #include <string> | 10 #include <string> |
| 10 #include <vector> | 11 #include <vector> |
| 11 | 12 |
| 12 #include "base/callback.h" | 13 #include "base/callback.h" |
| 13 #include "base/callback_list.h" | 14 #include "base/callback_list.h" |
| 14 #include "base/memory/scoped_ptr.h" | |
| 15 #include "content/common/content_export.h" | 15 #include "content/common/content_export.h" |
| 16 #include "url/gurl.h" | 16 #include "url/gurl.h" |
| 17 | 17 |
| 18 namespace content { | 18 namespace content { |
| 19 | 19 |
| 20 class NavigationEntry; | 20 class NavigationEntry; |
| 21 class BrowserContext; | 21 class BrowserContext; |
| 22 class ResourceContext; | 22 class ResourceContext; |
| 23 class SiteInstance; | 23 class SiteInstance; |
| 24 class WebContents; | 24 class WebContents; |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 int render_view_id) = 0; | 164 int render_view_id) = 0; |
| 165 | 165 |
| 166 // Get/Set the default zoom level for pages that don't override it. | 166 // Get/Set the default zoom level for pages that don't override it. |
| 167 virtual double GetDefaultZoomLevel() const = 0; | 167 virtual double GetDefaultZoomLevel() const = 0; |
| 168 virtual void SetDefaultZoomLevel(double level) = 0; | 168 virtual void SetDefaultZoomLevel(double level) = 0; |
| 169 | 169 |
| 170 typedef base::Callback<void(const ZoomLevelChange&)> ZoomLevelChangedCallback; | 170 typedef base::Callback<void(const ZoomLevelChange&)> ZoomLevelChangedCallback; |
| 171 typedef base::CallbackList<void(const ZoomLevelChange&)>::Subscription | 171 typedef base::CallbackList<void(const ZoomLevelChange&)>::Subscription |
| 172 Subscription; | 172 Subscription; |
| 173 // Add and remove zoom level changed callbacks. | 173 // Add and remove zoom level changed callbacks. |
| 174 virtual scoped_ptr<Subscription> AddZoomLevelChangedCallback( | 174 virtual std::unique_ptr<Subscription> AddZoomLevelChangedCallback( |
| 175 const ZoomLevelChangedCallback& callback) = 0; | 175 const ZoomLevelChangedCallback& callback) = 0; |
| 176 | 176 |
| 177 protected: | 177 protected: |
| 178 virtual ~HostZoomMap() {} | 178 virtual ~HostZoomMap() {} |
| 179 }; | 179 }; |
| 180 | 180 |
| 181 } // namespace content | 181 } // namespace content |
| 182 | 182 |
| 183 #endif // CONTENT_PUBLIC_BROWSER_HOST_ZOOM_MAP_H_ | 183 #endif // CONTENT_PUBLIC_BROWSER_HOST_ZOOM_MAP_H_ |
| OLD | NEW |