OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_UI_ZOOM_ZOOM_EVENT_MANAGER_H_ | |
6 #define CHROME_BROWSER_UI_ZOOM_ZOOM_EVENT_MANAGER_H_ | |
7 | |
8 #include "base/callback_list.h" | |
9 #include "base/supports_user_data.h" | |
10 #include "content/public/browser/host_zoom_map.h" | |
11 | |
12 namespace content { | |
13 class BrowserContext; | |
14 } // namespace content | |
15 | |
16 class ZoomEventManager : public base::SupportsUserData::Data { | |
sky
2014/06/24 16:23:42
Add description.
wjmaclean
2014/06/24 18:04:07
Done.
| |
17 public: | |
18 static ZoomEventManager* GetForBrowserContext( | |
sky
2014/06/24 16:23:42
nit: constructor/destructor should be first.
wjmaclean
2014/06/24 18:04:07
Done.
| |
19 content::BrowserContext* context); | |
20 | |
21 ZoomEventManager(); | |
22 virtual ~ZoomEventManager(); | |
23 | |
24 // Called by ZoomControllers when changes are made to zoom levels in manual | |
25 // mode in order that browser listeners can be notified. | |
26 void OnZoomLevelChanged(const content::HostZoomMap::ZoomLevelChange& change); | |
27 | |
28 // Add and remove zoom level changed callbacks. | |
29 scoped_ptr<content::HostZoomMap::Subscription> AddZoomLevelChangedCallback( | |
30 const content::HostZoomMap::ZoomLevelChangedCallback& callback); | |
31 | |
32 private: | |
33 base::CallbackList<void(const content::HostZoomMap::ZoomLevelChange&)> | |
34 zoom_level_changed_callbacks_; | |
35 }; | |
sky
2014/06/24 16:23:42
DISALLOW...
wjmaclean
2014/06/24 18:04:07
Done.
| |
36 | |
37 #endif // CHROME_BROWSER_UI_ZOOM_ZOOM_EVENT_MANAGER_H_ | |
OLD | NEW |