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_BROWSER_EXTENSIONS_WEBSTORE_INSTALL_HELPER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_WEBSTORE_INSTALL_HELPER_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_WEBSTORE_INSTALL_HELPER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_WEBSTORE_INSTALL_HELPER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 | 89 |
90 // The client who we'll report results back to. | 90 // The client who we'll report results back to. |
91 Delegate* delegate_; | 91 Delegate* delegate_; |
92 | 92 |
93 // The extension id of the manifest we're parsing. | 93 // The extension id of the manifest we're parsing. |
94 std::string id_; | 94 std::string id_; |
95 | 95 |
96 // The manifest to parse. | 96 // The manifest to parse. |
97 std::string manifest_; | 97 std::string manifest_; |
98 | 98 |
99 scoped_refptr<safe_json::SafeJsonParser> json_parser_; | |
100 | |
101 // If |icon_url_| is non-empty, it needs to be fetched and decoded into an | 99 // If |icon_url_| is non-empty, it needs to be fetched and decoded into an |
102 // SkBitmap. | 100 // SkBitmap. |
103 GURL icon_url_; | 101 GURL icon_url_; |
104 net::URLRequestContextGetter* context_getter_; // Only usable on UI thread. | 102 net::URLRequestContextGetter* context_getter_; // Only usable on UI thread. |
105 scoped_ptr<chrome::BitmapFetcher> icon_fetcher_; | 103 scoped_ptr<chrome::BitmapFetcher> icon_fetcher_; |
106 | 104 |
107 // Flags for whether we're done doing icon decoding and manifest parsing. | 105 // Flags for whether we're done doing icon decoding and manifest parsing. |
108 bool icon_decode_complete_; | 106 bool icon_decode_complete_; |
109 bool manifest_parse_complete_; | 107 bool manifest_parse_complete_; |
110 | 108 |
111 // The results of successful decoding/parsing. | 109 // The results of successful decoding/parsing. |
112 SkBitmap icon_; | 110 SkBitmap icon_; |
113 scoped_ptr<base::DictionaryValue> parsed_manifest_; | 111 scoped_ptr<base::DictionaryValue> parsed_manifest_; |
114 | 112 |
115 // A details string for keeping track of any errors. | 113 // A details string for keeping track of any errors. |
116 std::string error_; | 114 std::string error_; |
117 | 115 |
118 // A code to distinguish between an error with the icon, and an error with the | 116 // A code to distinguish between an error with the icon, and an error with the |
119 // manifest. | 117 // manifest. |
120 Delegate::InstallHelperResultCode parse_error_; | 118 Delegate::InstallHelperResultCode parse_error_; |
121 }; | 119 }; |
122 | 120 |
123 } // namespace extensions | 121 } // namespace extensions |
124 | 122 |
125 #endif // CHROME_BROWSER_EXTENSIONS_WEBSTORE_INSTALL_HELPER_H_ | 123 #endif // CHROME_BROWSER_EXTENSIONS_WEBSTORE_INSTALL_HELPER_H_ |
OLD | NEW |