| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 538 ExtensionFunction::ResponseAction WebstorePrivateSetStoreLoginFunction::Run() { | 538 ExtensionFunction::ResponseAction WebstorePrivateSetStoreLoginFunction::Run() { |
| 539 std::unique_ptr<SetStoreLogin::Params> params( | 539 std::unique_ptr<SetStoreLogin::Params> params( |
| 540 SetStoreLogin::Params::Create(*args_)); | 540 SetStoreLogin::Params::Create(*args_)); |
| 541 EXTENSION_FUNCTION_VALIDATE(params); | 541 EXTENSION_FUNCTION_VALIDATE(params); |
| 542 SetWebstoreLogin(chrome_details_.GetProfile(), params->login); | 542 SetWebstoreLogin(chrome_details_.GetProfile(), params->login); |
| 543 return RespondNow(NoArguments()); | 543 return RespondNow(NoArguments()); |
| 544 } | 544 } |
| 545 | 545 |
| 546 WebstorePrivateGetWebGLStatusFunction::WebstorePrivateGetWebGLStatusFunction() | 546 WebstorePrivateGetWebGLStatusFunction::WebstorePrivateGetWebGLStatusFunction() |
| 547 : feature_checker_(content::GpuFeatureChecker::Create( | 547 : feature_checker_(content::GpuFeatureChecker::Create( |
| 548 gpu::GPU_FEATURE_TYPE_WEBGL, | 548 gpu::GPU_FEATURE_TYPE_ACCELERATED_WEBGL, |
| 549 base::Bind(&WebstorePrivateGetWebGLStatusFunction::OnFeatureCheck, | 549 base::Bind(&WebstorePrivateGetWebGLStatusFunction::OnFeatureCheck, |
| 550 base::Unretained(this)))) {} | 550 base::Unretained(this)))) {} |
| 551 | 551 |
| 552 WebstorePrivateGetWebGLStatusFunction:: | 552 WebstorePrivateGetWebGLStatusFunction:: |
| 553 ~WebstorePrivateGetWebGLStatusFunction() {} | 553 ~WebstorePrivateGetWebGLStatusFunction() {} |
| 554 | 554 |
| 555 ExtensionFunction::ResponseAction WebstorePrivateGetWebGLStatusFunction::Run() { | 555 ExtensionFunction::ResponseAction WebstorePrivateGetWebGLStatusFunction::Run() { |
| 556 feature_checker_->CheckGpuFeatureAvailability(); | 556 feature_checker_->CheckGpuFeatureAvailability(); |
| 557 return RespondLater(); | 557 return RespondLater(); |
| 558 } | 558 } |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 652 | 652 |
| 653 return RespondNow(BuildResponse(is_pending_approval)); | 653 return RespondNow(BuildResponse(is_pending_approval)); |
| 654 } | 654 } |
| 655 | 655 |
| 656 ExtensionFunction::ResponseValue | 656 ExtensionFunction::ResponseValue |
| 657 WebstorePrivateIsPendingCustodianApprovalFunction::BuildResponse(bool result) { | 657 WebstorePrivateIsPendingCustodianApprovalFunction::BuildResponse(bool result) { |
| 658 return OneArgument(base::MakeUnique<base::Value>(result)); | 658 return OneArgument(base::MakeUnique<base::Value>(result)); |
| 659 } | 659 } |
| 660 | 660 |
| 661 } // namespace extensions | 661 } // namespace extensions |
| OLD | NEW |