OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_UNPACKER_H_ | 5 #ifndef CHROME_COMMON_EXTENSIONS_EXTENSION_UNPACKER_H_ |
6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_UNPACKER_H_ | 6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_UNPACKER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/file_path.h" | 12 #include "base/file_path.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "base/tuple.h" | 14 #include "base/tuple.h" |
15 | 15 |
| 16 class SkBitmap; |
| 17 |
| 18 namespace base { |
16 class DictionaryValue; | 19 class DictionaryValue; |
17 class SkBitmap; | 20 } |
| 21 |
| 22 using base::DictionaryValue; |
18 | 23 |
19 // This class unpacks an extension. It is designed to be used in a sandboxed | 24 // This class unpacks an extension. It is designed to be used in a sandboxed |
20 // child process. We unpack and parse various bits of the extension, then | 25 // child process. We unpack and parse various bits of the extension, then |
21 // report back to the browser process, who then transcodes the pre-parsed bits | 26 // report back to the browser process, who then transcodes the pre-parsed bits |
22 // and writes them back out to disk for later use. | 27 // and writes them back out to disk for later use. |
23 class ExtensionUnpacker { | 28 class ExtensionUnpacker { |
24 public: | 29 public: |
25 typedef std::vector< Tuple2<SkBitmap, FilePath> > DecodedImages; | 30 typedef std::vector< Tuple2<SkBitmap, FilePath> > DecodedImages; |
26 | 31 |
27 explicit ExtensionUnpacker(const FilePath& extension_path); | 32 explicit ExtensionUnpacker(const FilePath& extension_path); |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 // of _locales/locale, without messages.json base part. | 101 // of _locales/locale, without messages.json base part. |
97 scoped_ptr<DictionaryValue> parsed_catalogs_; | 102 scoped_ptr<DictionaryValue> parsed_catalogs_; |
98 | 103 |
99 // The last error message that was set. Empty if there were no errors. | 104 // The last error message that was set. Empty if there were no errors. |
100 std::string error_message_; | 105 std::string error_message_; |
101 | 106 |
102 DISALLOW_COPY_AND_ASSIGN(ExtensionUnpacker); | 107 DISALLOW_COPY_AND_ASSIGN(ExtensionUnpacker); |
103 }; | 108 }; |
104 | 109 |
105 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_UNPACKER_H_ | 110 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_UNPACKER_H_ |
OLD | NEW |