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

Unified Diff: chrome/common/extensions/extension_icon_set.h

Issue 225043002: Move extension_icon_set.{h,cc} to //extensions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 8 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
« no previous file with comments | « chrome/common/extensions/extension_file_util.cc ('k') | chrome/common/extensions/extension_icon_set.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/extension_icon_set.h
diff --git a/chrome/common/extensions/extension_icon_set.h b/chrome/common/extensions/extension_icon_set.h
deleted file mode 100644
index 487099e7195439c6a77765e5d2d130637400eeed..0000000000000000000000000000000000000000
--- a/chrome/common/extensions/extension_icon_set.h
+++ /dev/null
@@ -1,52 +0,0 @@
-// 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_COMMON_EXTENSIONS_EXTENSION_ICON_SET_H_
-#define CHROME_COMMON_EXTENSIONS_EXTENSION_ICON_SET_H_
-
-#include <map>
-#include <string>
-
-// Represents the set of icons for an extension.
-class ExtensionIconSet {
- public:
- // Get an icon from the set, optionally falling back to a smaller or bigger
- // size. MatchType is exclusive (do not OR them together).
- enum MatchType {
- MATCH_EXACTLY,
- MATCH_BIGGER,
- MATCH_SMALLER
- };
-
- // Access to the underlying map from icon size->{path, bitmap}.
- typedef std::map<int, std::string> IconMap;
-
- ExtensionIconSet();
- ~ExtensionIconSet();
-
- const IconMap& map() const { return map_; }
- bool empty() const { return map_.empty(); }
-
- // Remove all icons from the set.
- void Clear();
-
- // Add an icon path to the set. If a path for the specified size is already
- // present, it is overwritten.
- void Add(int size, const std::string& path);
-
- // Gets path value of the icon found when searching for |size| using
- // |mathc_type|.
- std::string Get(int size, MatchType match_type) const;
-
- // Returns true iff the set contains the specified path.
- bool ContainsPath(const std::string& path) const;
-
- // Returns icon size if the set contains the specified path or 0 if not found.
- int GetIconSizeFromPath(const std::string& path) const;
-
- private:
- IconMap map_;
-};
-
-#endif // CHROME_COMMON_EXTENSIONS_EXTENSION_ICON_SET_H_
« no previous file with comments | « chrome/common/extensions/extension_file_util.cc ('k') | chrome/common/extensions/extension_icon_set.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698