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

Side by Side Diff: chrome/common/extensions/manifest_handler_helpers.h

Issue 11588004: Move ScriptBadge, ActionInfo out of Extension; preparation for BrowserAction (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Yoyo's requested changes Created 8 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 unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_COMMON_EXTENSIONS_MANIFEST_HANDLER_HELPERS_H_
6 #define CHROME_COMMON_EXTENSIONS_MANIFEST_HANDLER_HELPERS_H_
7
8 #include <string>
9
10 #include "base/string16.h"
11
12 namespace base {
13 class DictionaryValue;
14 }
15
16 class ExtensionIconSet;
17
18 namespace extensions {
19 namespace manifest_handler_helpers {
20
21 // Strips leading slashes from the file path. Returns true iff the final path is
22 // non empty.
23 bool NormalizeAndValidatePath(std::string* path);
24
25 // Loads icon paths defined in dictionary |icons_value| into ExtensionIconSet
26 // |icons|. |icons_value| is a dictionary value {icon size -> icon path}. Icons
27 // in |icons_value| whose size is not in |icon_sizes| will be ignored.
28 // Returns success. If load fails, |error| will be set.
29 bool LoadIconsFromDictionary(const base::DictionaryValue* icons_value,
30 const int* icon_sizes,
31 size_t num_icon_sizes,
32 ExtensionIconSet* icons,
33 string16* error);
34
35 } // namespace manifest_handler_helpers
36 } // namespace extensions
37
38 #endif // CHROME_COMMON_EXTENSIONS_MANIFEST_HANDLER_HELPERS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698