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

Unified Diff: extensions/browser/extension_zoom_request_client.h

Issue 769593003: Move ZoomObserver, ZoomController and ZoomEventManager to components/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove obsolete defines in build files. Created 6 years 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
« no previous file with comments | « extensions/browser/DEPS ('k') | extensions/browser/extension_zoom_request_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/extension_zoom_request_client.h
diff --git a/extensions/browser/extension_zoom_request_client.h b/extensions/browser/extension_zoom_request_client.h
new file mode 100644
index 0000000000000000000000000000000000000000..25d2196c0c0e4e77b4d5a82b13db4aaa64490fe6
--- /dev/null
+++ b/extensions/browser/extension_zoom_request_client.h
@@ -0,0 +1,35 @@
+// 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 EXTENSIONS_BROWSER_EXTENSION_ZOOM_REQUEST_CLIENT_H_
+#define EXTENSIONS_BROWSER_EXTENSION_ZOOM_REQUEST_CLIENT_H_
+
+#include "base/memory/scoped_ptr.h"
+#include "components/ui/zoom/zoom_controller.h"
+#include "extensions/common/extension.h"
+
+namespace extensions {
+
+class Extension;
+
+// This class implements ZoomRequestClient in order to encapsulate a ref pointer
+// back to an extension requesting a zoom level change. This is important so
+// that zoom event observers can determine if an extension made the request
+// as opposed to direct user input.
+class ExtensionZoomRequestClient : public ui_zoom::ZoomRequestClient {
+ public:
+ explicit ExtensionZoomRequestClient(scoped_refptr<const Extension> extension);
+
+ const Extension* extension() const { return extension_.get(); }
+
+ private:
+ ~ExtensionZoomRequestClient() override;
+ scoped_refptr<const Extension> extension_;
+
+ DISALLOW_COPY_AND_ASSIGN(ExtensionZoomRequestClient);
+};
+
+} // namespace extensions
+
+#endif // EXTENSIONS_BROWSER_EXTENSION_ZOOM_REQUEST_CLIENT_H_
« no previous file with comments | « extensions/browser/DEPS ('k') | extensions/browser/extension_zoom_request_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698