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_STANDALONE_INSTALLER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_WEBSTORE_STANDALONE_INSTALLER_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_WEBSTORE_STANDALONE_INSTALLER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_WEBSTORE_STANDALONE_INSTALLER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 double average_rating() const { return average_rating_; } | 128 double average_rating() const { return average_rating_; } |
129 int rating_count() const { return rating_count_; } | 129 int rating_count() const { return rating_count_; } |
130 void set_install_source(WebstoreInstaller::InstallSource source) { | 130 void set_install_source(WebstoreInstaller::InstallSource source) { |
131 install_source_ = source; | 131 install_source_ = source; |
132 } | 132 } |
133 WebstoreInstaller::InstallSource install_source() const { | 133 WebstoreInstaller::InstallSource install_source() const { |
134 return install_source_; | 134 return install_source_; |
135 } | 135 } |
136 Profile* profile() const { return profile_; } | 136 Profile* profile() const { return profile_; } |
137 const std::string& id() const { return id_; } | 137 const std::string& id() const { return id_; } |
138 const DictionaryValue* manifest() const { return manifest_.get(); } | 138 const base::DictionaryValue* manifest() const { return manifest_.get(); } |
139 | 139 |
140 private: | 140 private: |
141 friend class base::RefCountedThreadSafe<WebstoreStandaloneInstaller>; | 141 friend class base::RefCountedThreadSafe<WebstoreStandaloneInstaller>; |
142 FRIEND_TEST_ALL_PREFIXES(WebstoreStandaloneInstallerTest, DomainVerification); | 142 FRIEND_TEST_ALL_PREFIXES(WebstoreStandaloneInstallerTest, DomainVerification); |
143 | 143 |
144 // Several delegate/client interface implementations follow. The normal flow | 144 // Several delegate/client interface implementations follow. The normal flow |
145 // (for successful installs) is: | 145 // (for successful installs) is: |
146 // | 146 // |
147 // 1. BeginInstall: starts the fetch of data from the webstore | 147 // 1. BeginInstall: starts the fetch of data from the webstore |
148 // 2. OnURLFetchComplete: starts the parsing of data from the webstore | 148 // 2. OnURLFetchComplete: starts the parsing of data from the webstore |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 // For fetching webstore JSON data. | 199 // For fetching webstore JSON data. |
200 scoped_ptr<WebstoreDataFetcher> webstore_data_fetcher_; | 200 scoped_ptr<WebstoreDataFetcher> webstore_data_fetcher_; |
201 | 201 |
202 // Extracted from the webstore JSON data response. | 202 // Extracted from the webstore JSON data response. |
203 std::string localized_name_; | 203 std::string localized_name_; |
204 std::string localized_description_; | 204 std::string localized_description_; |
205 bool show_user_count_; | 205 bool show_user_count_; |
206 std::string localized_user_count_; | 206 std::string localized_user_count_; |
207 double average_rating_; | 207 double average_rating_; |
208 int rating_count_; | 208 int rating_count_; |
209 scoped_ptr<DictionaryValue> webstore_data_; | 209 scoped_ptr<base::DictionaryValue> webstore_data_; |
210 scoped_ptr<DictionaryValue> manifest_; | 210 scoped_ptr<base::DictionaryValue> manifest_; |
211 SkBitmap icon_; | 211 SkBitmap icon_; |
212 | 212 |
213 // Created by ShowInstallUI() when a prompt is shown (if | 213 // Created by ShowInstallUI() when a prompt is shown (if |
214 // the implementor returns a non-NULL in CreateInstallPrompt()). | 214 // the implementor returns a non-NULL in CreateInstallPrompt()). |
215 scoped_refptr<Extension> localized_extension_for_display_; | 215 scoped_refptr<Extension> localized_extension_for_display_; |
216 | 216 |
217 DISALLOW_IMPLICIT_CONSTRUCTORS(WebstoreStandaloneInstaller); | 217 DISALLOW_IMPLICIT_CONSTRUCTORS(WebstoreStandaloneInstaller); |
218 }; | 218 }; |
219 | 219 |
220 } // namespace extensions | 220 } // namespace extensions |
221 | 221 |
222 #endif // CHROME_BROWSER_EXTENSIONS_WEBSTORE_STANDALONE_INSTALLER_H_ | 222 #endif // CHROME_BROWSER_EXTENSIONS_WEBSTORE_STANDALONE_INSTALLER_H_ |
OLD | NEW |