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 "base/bind.h" |
| 8 #include "content/browser/payments/payment_app_context.h" |
| 9 #include "content/public/browser/browser_thread.h" |
| 10 |
| 11 namespace content { |
| 12 |
| 13 PaymentAppManager::~PaymentAppManager() { |
| 14 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| 15 } |
| 16 |
| 17 PaymentAppManager::PaymentAppManager( |
| 18 PaymentAppContext* payment_app_context, |
| 19 mojo::InterfaceRequest<payments::mojom::PaymentAppManager> request) |
| 20 : payment_app_context_(payment_app_context), |
| 21 binding_(this, std::move(request)), |
| 22 weak_ptr_factory_(this) { |
| 23 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| 24 DCHECK(payment_app_context); |
| 25 |
| 26 binding_.set_connection_error_handler( |
| 27 base::Bind(&PaymentAppManager::OnConnectionError, |
| 28 base::Unretained(this))); |
| 29 } |
| 30 |
| 31 void PaymentAppManager::OnConnectionError() { |
| 32 payment_app_context_->ServiceHadConnectionError(this); |
| 33 } |
| 34 |
| 35 void PaymentAppManager::SetManifest( |
| 36 const std::string& scope, |
| 37 payments::mojom::PaymentAppManifestPtr manifest, |
| 38 const SetManifestCallback& callback) { |
| 39 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| 40 callback.Run(payments::mojom::PaymentAppManifestError::NOT_IMPLEMENTED); |
| 41 } |
| 42 |
| 43 } // namespace content |
OLD | NEW |