Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(562)

Unified Diff: chrome/browser/ui/zoom/zoom_event_manager.h

Issue 301733006: Zoom Extension API (chrome) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add event manager for manual zoom events. Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..09bfe23c8cf5b59127e03a655f8f0f8d05e791fd
--- /dev/null
+++ b/chrome/browser/ui/zoom/zoom_event_manager.h
@@ -0,0 +1,32 @@
+// Copyright (c) 2014 The Chromium Authors. All rights reserved.
wjmaclean 2014/06/18 19:03:55 Removed (c) here as well.
+// 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 {
+ public:
+ static ZoomEventManager* GetForBrowserContext(
+ content::BrowserContext* context);
+
+ ZoomEventManager();
+ virtual ~ZoomEventManager();
+
+ void OnZoomLevelChanged(const content::HostZoomMap::ZoomLevelChange& change);
Devlin 2014/06/16 19:04:50 comment.
wjmaclean 2014/06/18 19:03:55 Done.
+ scoped_ptr<content::HostZoomMap::Subscription> AddZoomLevelChangedCallback(
+ const content::HostZoomMap::ZoomLevelChangedCallback& callback);
+
+ private:
+ base::CallbackList<void(const content::HostZoomMap::ZoomLevelChange&)>
+ zoom_level_changed_callbacks_;
+};
+#endif // CHROME_BROWSER_UI_ZOOM_ZOOM_EVENT_MANAGER_H_

Powered by Google App Engine
This is Rietveld 408576698