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

Side by Side Diff: third_party/WebKit/Source/modules/payments/PaymentManager.cpp

Issue 2958333002: [Payments] Implement web payment app manifest (Closed)
Patch Set: fix tests and add comments Created 3 years, 5 months 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 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 "modules/payments/PaymentManager.h" 5 #include "modules/payments/PaymentManager.h"
6 6
7 #include "bindings/core/v8/ScriptPromise.h" 7 #include "bindings/core/v8/ScriptPromise.h"
8 #include "core/dom/DOMException.h" 8 #include "core/dom/DOMException.h"
9 #include "modules/payments/PaymentInstruments.h" 9 #include "modules/payments/PaymentInstruments.h"
10 #include "modules/serviceworkers/ServiceWorkerRegistration.h" 10 #include "modules/serviceworkers/ServiceWorkerRegistration.h"
(...skipping 22 matching lines...) Expand all
33 33
34 PaymentManager::PaymentManager(ServiceWorkerRegistration* registration) 34 PaymentManager::PaymentManager(ServiceWorkerRegistration* registration)
35 : registration_(registration), instruments_(nullptr) { 35 : registration_(registration), instruments_(nullptr) {
36 DCHECK(registration); 36 DCHECK(registration);
37 Platform::Current()->GetInterfaceProvider()->GetInterface( 37 Platform::Current()->GetInterfaceProvider()->GetInterface(
38 mojo::MakeRequest(&manager_)); 38 mojo::MakeRequest(&manager_));
39 39
40 manager_.set_connection_error_handler(ConvertToBaseCallback(WTF::Bind( 40 manager_.set_connection_error_handler(ConvertToBaseCallback(WTF::Bind(
41 &PaymentManager::OnServiceConnectionError, WrapWeakPersistent(this)))); 41 &PaymentManager::OnServiceConnectionError, WrapWeakPersistent(this))));
42 42
43 manager_->Init(registration_->scope()); 43 manager_->Init(registration_->GetExecutionContext()->Url().GetString(),
44 registration_->scope());
44 } 45 }
45 46
46 void PaymentManager::OnServiceConnectionError() { 47 void PaymentManager::OnServiceConnectionError() {
47 manager_.reset(); 48 manager_.reset();
48 } 49 }
49 50
50 } // namespace blink 51 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698