OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "content/browser/payments/payment_app_manager.h" |
| 6 |
| 7 #include <utility> |
| 8 |
| 9 #include "base/bind.h" |
| 10 #include "content/browser/payments/payment_app_context.h" |
| 11 #include "content/public/browser/browser_thread.h" |
| 12 |
| 13 namespace content { |
| 14 |
| 15 PaymentAppManager::~PaymentAppManager() { |
| 16 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| 17 } |
| 18 |
| 19 PaymentAppManager::PaymentAppManager( |
| 20 PaymentAppContext* payment_app_context, |
| 21 mojo::InterfaceRequest<payments::mojom::PaymentAppManager> request) |
| 22 : payment_app_context_(payment_app_context), |
| 23 binding_(this, std::move(request)), |
| 24 weak_ptr_factory_(this) { |
| 25 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| 26 DCHECK(payment_app_context); |
| 27 |
| 28 binding_.set_connection_error_handler( |
| 29 base::Bind(&PaymentAppManager::OnConnectionError, |
| 30 base::Unretained(this))); |
| 31 } |
| 32 |
| 33 void PaymentAppManager::OnConnectionError() { |
| 34 payment_app_context_->ServiceHadConnectionError(this); |
| 35 } |
| 36 |
| 37 void PaymentAppManager::SetManifest( |
| 38 const std::string& scope, |
| 39 payments::mojom::PaymentAppManifestPtr manifest, |
| 40 const SetManifestCallback& callback) { |
| 41 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| 42 callback.Run(payments::mojom::PaymentAppManifestError::NOT_IMPLEMENTED); |
| 43 } |
| 44 |
| 45 } // namespace content |
OLD | NEW |