| 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_; | 99 safe_json::SafeJsonParser* json_parser_; |
| 100 | 100 |
| 101 // If |icon_url_| is non-empty, it needs to be fetched and decoded into an | 101 // If |icon_url_| is non-empty, it needs to be fetched and decoded into an |
| 102 // SkBitmap. | 102 // SkBitmap. |
| 103 GURL icon_url_; | 103 GURL icon_url_; |
| 104 net::URLRequestContextGetter* context_getter_; // Only usable on UI thread. | 104 net::URLRequestContextGetter* context_getter_; // Only usable on UI thread. |
| 105 scoped_ptr<chrome::BitmapFetcher> icon_fetcher_; | 105 scoped_ptr<chrome::BitmapFetcher> icon_fetcher_; |
| 106 | 106 |
| 107 // Flags for whether we're done doing icon decoding and manifest parsing. | 107 // Flags for whether we're done doing icon decoding and manifest parsing. |
| 108 bool icon_decode_complete_; | 108 bool icon_decode_complete_; |
| 109 bool manifest_parse_complete_; | 109 bool manifest_parse_complete_; |
| 110 | 110 |
| 111 // The results of successful decoding/parsing. | 111 // The results of successful decoding/parsing. |
| 112 SkBitmap icon_; | 112 SkBitmap icon_; |
| 113 scoped_ptr<base::DictionaryValue> parsed_manifest_; | 113 scoped_ptr<base::DictionaryValue> parsed_manifest_; |
| 114 | 114 |
| 115 // A details string for keeping track of any errors. | 115 // A details string for keeping track of any errors. |
| 116 std::string error_; | 116 std::string error_; |
| 117 | 117 |
| 118 // A code to distinguish between an error with the icon, and an error with the | 118 // A code to distinguish between an error with the icon, and an error with the |
| 119 // manifest. | 119 // manifest. |
| 120 Delegate::InstallHelperResultCode parse_error_; | 120 Delegate::InstallHelperResultCode parse_error_; |
| 121 }; | 121 }; |
| 122 | 122 |
| 123 } // namespace extensions | 123 } // namespace extensions |
| 124 | 124 |
| 125 #endif // CHROME_BROWSER_EXTENSIONS_WEBSTORE_INSTALL_HELPER_H_ | 125 #endif // CHROME_BROWSER_EXTENSIONS_WEBSTORE_INSTALL_HELPER_H_ |
| OLD | NEW |