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

Unified Diff: chrome/browser/extensions/extension_action_icon_factory.h

Issue 10905005: Change browser/page action default icon defined in manifest to support hidpi. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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/extensions/extension_action_icon_factory.h
diff --git a/chrome/browser/extensions/extension_action_icon_factory.h b/chrome/browser/extensions/extension_action_icon_factory.h
new file mode 100644
index 0000000000000000000000000000000000000000..b07c6e01047714f78a2cc4499af56f1931776996
--- /dev/null
+++ b/chrome/browser/extensions/extension_action_icon_factory.h
@@ -0,0 +1,43 @@
+// Copyright (c) 2012 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_EXTENSIONS_EXTENSION_ACTION_ICON_FACTORY_H_
+#define CHROME_BROWSER_EXTENSIONS_EXTENSION_ACTION_ICON_FACTORY_H_
+
+#include "chrome/common/extensions/extension_action.h"
+
+class ExtensionActionIcon;
+class ExtensionIconSet;
+
+namespace extensions {
+class Extension;
+}
+
+class ExtensionActionIconFactory : public ExtensionAction::IconFactory {
+ public:
+ class Observer {
+ public:
+ virtual ~Observer() {}
+ virtual void OnIconUpdated() = 0;
+ };
+
+ // Observer should outlive this.
+ ExtensionActionIconFactory(const extensions::Extension* extension,
+ Observer* observer);
+ virtual ~ExtensionActionIconFactory();
+
+ // ExtensionAction::IconWrapperFactory override.
+ virtual gfx::ImageSkia GetIcon(const ExtensionIconSet* icon_set,
+ ExtensionAction::Type) OVERRIDE;
+
+ private:
+ const extensions::Extension* extension_;
+ Observer* observer_;
+ const ExtensionIconSet* last_icon_set_;
+ scoped_ptr<ExtensionActionIcon> icon_;
+
+ DISALLOW_COPY_AND_ASSIGN(ExtensionActionIconFactory);
+};
+
+#endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_ACTION_ICON_FACTORY_H_

Powered by Google App Engine
This is Rietveld 408576698