| 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/api/webstore_private/webstore_private_api.h" | 5 #include "chrome/browser/extensions/api/webstore_private/webstore_private_api.h" |
| 6 | 6 |
| 7 #include "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
| 8 #include "base/memory/scoped_vector.h" | 8 #include "base/memory/scoped_vector.h" |
| 9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| (...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 359 std::string error; | 359 std::string error; |
| 360 dummy_extension_ = ExtensionInstallPrompt::GetLocalizedExtensionForDisplay( | 360 dummy_extension_ = ExtensionInstallPrompt::GetLocalizedExtensionForDisplay( |
| 361 parsed_manifest_.get(), id, localized_name_, "", &error); | 361 parsed_manifest_.get(), id, localized_name_, "", &error); |
| 362 | 362 |
| 363 if (!dummy_extension_) { | 363 if (!dummy_extension_) { |
| 364 OnWebstoreParseFailure(id_, WebstoreInstallHelper::Delegate::MANIFEST_ERROR, | 364 OnWebstoreParseFailure(id_, WebstoreInstallHelper::Delegate::MANIFEST_ERROR, |
| 365 kInvalidManifestError); | 365 kInvalidManifestError); |
| 366 return; | 366 return; |
| 367 } | 367 } |
| 368 | 368 |
| 369 install_prompt_.reset(new ExtensionInstallPrompt(GetCurrentBrowser())); | 369 install_prompt_.reset( |
| 370 chrome::CreateExtensionInstallPromptWithBrowser(GetCurrentBrowser())); |
| 370 install_prompt_->ConfirmWebstoreInstall(this, dummy_extension_, &icon_); | 371 install_prompt_->ConfirmWebstoreInstall(this, dummy_extension_, &icon_); |
| 371 // Control flow finishes up in InstallUIProceed or InstallUIAbort. | 372 // Control flow finishes up in InstallUIProceed or InstallUIAbort. |
| 372 } | 373 } |
| 373 | 374 |
| 374 void BeginInstallWithManifestFunction::OnWebstoreParseFailure( | 375 void BeginInstallWithManifestFunction::OnWebstoreParseFailure( |
| 375 const std::string& id, | 376 const std::string& id, |
| 376 WebstoreInstallHelper::Delegate::InstallHelperResultCode result_code, | 377 WebstoreInstallHelper::Delegate::InstallHelperResultCode result_code, |
| 377 const std::string& error_message) { | 378 const std::string& error_message) { |
| 378 CHECK_EQ(id_, id); | 379 CHECK_EQ(id_, id); |
| 379 | 380 |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 593 feature_checker_->CheckGPUFeatureAvailability(); | 594 feature_checker_->CheckGPUFeatureAvailability(); |
| 594 return true; | 595 return true; |
| 595 } | 596 } |
| 596 | 597 |
| 597 void GetWebGLStatusFunction::OnFeatureCheck(bool feature_allowed) { | 598 void GetWebGLStatusFunction::OnFeatureCheck(bool feature_allowed) { |
| 598 CreateResult(feature_allowed); | 599 CreateResult(feature_allowed); |
| 599 SendResponse(true); | 600 SendResponse(true); |
| 600 } | 601 } |
| 601 | 602 |
| 602 } // namespace extensions | 603 } // namespace extensions |
| OLD | NEW |