| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_ZOOM_LEVEL_DELEGATE_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_ZOOM_LEVEL_DELEGATE_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_ZOOM_LEVEL_DELEGATE_H_ | 6 #define CONTENT_PUBLIC_BROWSER_ZOOM_LEVEL_DELEGATE_H_ |
| 7 | 7 |
| 8 #include "base/callback_list.h" |
| 9 |
| 8 namespace content { | 10 namespace content { |
| 9 | 11 |
| 10 class HostZoomMap; | 12 class HostZoomMap; |
| 11 | 13 |
| 12 // An interface to allow the client to initialize the HostZoomMap. | 14 // An interface to allow the client to initialize the HostZoomMap |
| 15 // and to know the default zoom scope. |
| 13 class ZoomLevelDelegate { | 16 class ZoomLevelDelegate { |
| 14 public: | 17 public: |
| 18 typedef base::CallbackList<void(void)>::Subscription |
| 19 DefaultZoomScopeSubscription; |
| 20 |
| 15 virtual void InitHostZoomMap(HostZoomMap* host_zoom_map) = 0; | 21 virtual void InitHostZoomMap(HostZoomMap* host_zoom_map) = 0; |
| 22 |
| 23 virtual bool GetIsOriginScopePref() const = 0; |
| 24 virtual std::unique_ptr<DefaultZoomScopeSubscription> |
| 25 RegisterDefaultZoomScopeCallback(const base::Closure& callback) = 0; |
| 26 |
| 16 virtual ~ZoomLevelDelegate() {} | 27 virtual ~ZoomLevelDelegate() {} |
| 17 }; | 28 }; |
| 18 | 29 |
| 19 } // namespace content | 30 } // namespace content |
| 20 | 31 |
| 21 #endif // CONTENT_PUBLIC_BROWSER_ZOOM_LEVEL_DELEGATE_H_ | 32 #endif // CONTENT_PUBLIC_BROWSER_ZOOM_LEVEL_DELEGATE_H_ |
| OLD | NEW |