Chromium Code Reviews| Index: chrome/browser/ui/zoom/zoom_event_manager.h |
| diff --git a/chrome/browser/ui/zoom/zoom_event_manager.h b/chrome/browser/ui/zoom/zoom_event_manager.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..e5ce7ed19da2562208478d9c0653169b895cbb2d |
| --- /dev/null |
| +++ b/chrome/browser/ui/zoom/zoom_event_manager.h |
| @@ -0,0 +1,37 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_UI_ZOOM_ZOOM_EVENT_MANAGER_H_ |
| +#define CHROME_BROWSER_UI_ZOOM_ZOOM_EVENT_MANAGER_H_ |
| + |
| +#include "base/callback_list.h" |
| +#include "base/supports_user_data.h" |
| +#include "content/public/browser/host_zoom_map.h" |
| + |
| +namespace content { |
| +class BrowserContext; |
| +} // namespace content |
| + |
| +class ZoomEventManager : public base::SupportsUserData::Data { |
|
sky
2014/06/24 16:23:42
Add description.
wjmaclean
2014/06/24 18:04:07
Done.
|
| + public: |
| + static ZoomEventManager* GetForBrowserContext( |
|
sky
2014/06/24 16:23:42
nit: constructor/destructor should be first.
wjmaclean
2014/06/24 18:04:07
Done.
|
| + content::BrowserContext* context); |
| + |
| + ZoomEventManager(); |
| + virtual ~ZoomEventManager(); |
| + |
| + // Called by ZoomControllers when changes are made to zoom levels in manual |
| + // mode in order that browser listeners can be notified. |
| + void OnZoomLevelChanged(const content::HostZoomMap::ZoomLevelChange& change); |
| + |
| + // Add and remove zoom level changed callbacks. |
| + scoped_ptr<content::HostZoomMap::Subscription> AddZoomLevelChangedCallback( |
| + const content::HostZoomMap::ZoomLevelChangedCallback& callback); |
| + |
| + private: |
| + base::CallbackList<void(const content::HostZoomMap::ZoomLevelChange&)> |
| + zoom_level_changed_callbacks_; |
| +}; |
|
sky
2014/06/24 16:23:42
DISALLOW...
wjmaclean
2014/06/24 18:04:07
Done.
|
| + |
| +#endif // CHROME_BROWSER_UI_ZOOM_ZOOM_EVENT_MANAGER_H_ |