| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_COMMON_EXTENSIONS_EXTENSION_ICON_SET_H_ | 5 #ifndef EXTENSIONS_COMMON_EXTENSION_ICON_SET_H_ |
| 6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_ICON_SET_H_ | 6 #define EXTENSIONS_COMMON_EXTENSION_ICON_SET_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 // Represents the set of icons for an extension. | 11 // Represents the set of icons for an extension. |
| 12 class ExtensionIconSet { | 12 class ExtensionIconSet { |
| 13 public: | 13 public: |
| 14 // Get an icon from the set, optionally falling back to a smaller or bigger | 14 // Get an icon from the set, optionally falling back to a smaller or bigger |
| 15 // size. MatchType is exclusive (do not OR them together). | 15 // size. MatchType is exclusive (do not OR them together). |
| 16 enum MatchType { | 16 enum MatchType { |
| (...skipping 25 matching lines...) Expand all Loading... |
| 42 // Returns true iff the set contains the specified path. | 42 // Returns true iff the set contains the specified path. |
| 43 bool ContainsPath(const std::string& path) const; | 43 bool ContainsPath(const std::string& path) const; |
| 44 | 44 |
| 45 // Returns icon size if the set contains the specified path or 0 if not found. | 45 // Returns icon size if the set contains the specified path or 0 if not found. |
| 46 int GetIconSizeFromPath(const std::string& path) const; | 46 int GetIconSizeFromPath(const std::string& path) const; |
| 47 | 47 |
| 48 private: | 48 private: |
| 49 IconMap map_; | 49 IconMap map_; |
| 50 }; | 50 }; |
| 51 | 51 |
| 52 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_ICON_SET_H_ | 52 #endif // EXTENSIONS_COMMON_EXTENSION_ICON_SET_H_ |
| OLD | NEW |