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 #include "chrome/browser/extensions/webstore_standalone_installer.h" | 5 #include "chrome/browser/extensions/webstore_standalone_installer.h" |
6 | 6 |
7 #include "base/values.h" | 7 #include "base/values.h" |
8 #include "chrome/browser/extensions/crx_installer.h" | 8 #include "chrome/browser/extensions/crx_installer.h" |
9 #include "chrome/browser/extensions/extension_install_prompt.h" | 9 #include "chrome/browser/extensions/extension_install_prompt.h" |
10 #include "chrome/browser/extensions/extension_install_ui.h" | 10 #include "chrome/browser/extensions/extension_install_ui.h" |
11 #include "chrome/browser/extensions/extension_service.h" | 11 #include "chrome/browser/extensions/extension_service.h" |
12 #include "chrome/browser/extensions/webstore_data_fetcher.h" | 12 #include "chrome/browser/extensions/webstore_data_fetcher.h" |
13 #include "chrome/browser/profiles/profile.h" | 13 #include "chrome/browser/profiles/profile.h" |
14 #include "chrome/common/extensions/extension.h" | 14 #include "chrome/common/extensions/extension.h" |
15 #include "content/public/browser/web_contents.h" | 15 #include "content/public/browser/web_contents.h" |
16 #include "url/gurl.h" | 16 #include "url/gurl.h" |
17 | 17 |
18 using content::WebContents; | 18 using content::WebContents; |
19 | 19 |
20 namespace extensions { | 20 namespace extensions { |
21 | 21 |
22 const char kManifestKey[] = "manifest"; | 22 const char kManifestKey[] = "manifest"; |
23 const char kIconUrlKey[] = "icon_url"; | 23 const char kIconUrlKey[] = "icon_url"; |
24 const char kLocalizedNameKey[] = "localized_name"; | 24 const char kLocalizedNameKey[] = "localized_name"; |
25 const char kLocalizedDescriptionKey[] = "localized_description"; | 25 const char kLocalizedDescriptionKey[] = "localized_description"; |
26 const char kUsersKey[] = "users"; | 26 const char kUsersKey[] = "users"; |
27 const char kShowUserCountKey[] = "show_user_count"; | 27 const char kShowUserCountKey[] = "show_user_count"; |
28 const char kAverageRatingKey[] = "average_rating"; | 28 const char kAverageRatingKey[] = "average_rating"; |
29 const char kRatingCountKey[] = "rating_count"; | 29 const char kRatingCountKey[] = "rating_count"; |
30 const char kRedirectUrlKey[] = "redirect_url"; | |
31 | 30 |
32 const char kInvalidWebstoreItemId[] = "Invalid Chrome Web Store item ID"; | 31 const char kInvalidWebstoreItemId[] = "Invalid Chrome Web Store item ID"; |
33 const char kWebstoreRequestError[] = | 32 const char kWebstoreRequestError[] = |
34 "Could not fetch data from the Chrome Web Store"; | 33 "Could not fetch data from the Chrome Web Store"; |
35 const char kInvalidWebstoreResponseError[] = "Invalid Chrome Web Store reponse"; | 34 const char kInvalidWebstoreResponseError[] = "Invalid Chrome Web Store reponse"; |
36 const char kInvalidManifestError[] = "Invalid manifest"; | 35 const char kInvalidManifestError[] = "Invalid manifest"; |
37 const char kUserCancelledError[] = "User cancelled install"; | 36 const char kUserCancelledError[] = "User cancelled install"; |
38 | 37 |
39 | 38 |
40 WebstoreStandaloneInstaller::WebstoreStandaloneInstaller( | 39 WebstoreStandaloneInstaller::WebstoreStandaloneInstaller( |
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 CompleteInstall(kInvalidManifestError); | 278 CompleteInstall(kInvalidManifestError); |
280 return; | 279 return; |
281 } | 280 } |
282 | 281 |
283 install_ui_ = CreateInstallUI(); | 282 install_ui_ = CreateInstallUI(); |
284 install_ui_->ConfirmStandaloneInstall( | 283 install_ui_->ConfirmStandaloneInstall( |
285 this, localized_extension_for_display_.get(), &icon_, *install_prompt_); | 284 this, localized_extension_for_display_.get(), &icon_, *install_prompt_); |
286 } | 285 } |
287 | 286 |
288 } // namespace extensions | 287 } // namespace extensions |
OLD | NEW |