Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(563)

Unified Diff: content/browser/payments/payment_app_manager.cc

Issue 2476343002: PaymentApp: Initial implementation for PaymentAppManager.setManifest(). (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/payments/payment_app_manager.cc
diff --git a/content/browser/payments/payment_app_manager.cc b/content/browser/payments/payment_app_manager.cc
new file mode 100644
index 0000000000000000000000000000000000000000..608495bdfdaca7cf6f71918aebdc632d93345fcd
--- /dev/null
+++ b/content/browser/payments/payment_app_manager.cc
@@ -0,0 +1,46 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "content/browser/payments/payment_app_manager.h"
+
+#include <utility>
+
+#include "base/memory/weak_ptr.h"
+#include "base/stl_util.h"
+#include "content/browser/payments/payment_app_context.h"
+#include "content/public/browser/browser_thread.h"
+
+namespace content {
+
+PaymentAppManager::~PaymentAppManager() {
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
+}
+
+PaymentAppManager::PaymentAppManager(
+ PaymentAppContext* payment_app_context,
+ mojo::InterfaceRequest<blink::mojom::PaymentAppManager> request)
+ : payment_app_context_(payment_app_context),
+ binding_(this, std::move(request)),
+ weak_ptr_factory_(this) {
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
+ DCHECK(payment_app_context);
+
+ binding_.set_connection_error_handler(
+ base::Bind(&PaymentAppManager::OnConnectionError,
+ base::Unretained(this)));
+}
+
+void PaymentAppManager::OnConnectionError() {
+ payment_app_context_->ServiceHadConnectionError(this);
+}
+
+void PaymentAppManager::SetManifest(
+ const mojo::String& scope,
+ blink::mojom::PaymentAppManifestPtr manifest,
+ const SetManifestCallback& callback) {
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
+ callback.Run(blink::mojom::PaymentAppManifestError::NOT_IMPLEMENTED);
+}
+
+} // namespace content

Powered by Google App Engine
This is Rietveld 408576698