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

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

Issue 2958333002: [Payments] Implement web payment app manifest (Closed)
Patch Set: rename and 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 "core/dom/Document.h" 9 #include "core/dom/Document.h"
10 #include "core/frame/LocalFrame.h" 10 #include "core/frame/LocalFrame.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 if (frame) 46 if (frame)
47 frame->GetInterfaceProvider()->GetInterface(std::move(request)); 47 frame->GetInterfaceProvider()->GetInterface(std::move(request));
48 } else if (context && context->IsWorkerGlobalScope()) { 48 } else if (context && context->IsWorkerGlobalScope()) {
49 WorkerThread* thread = ToWorkerGlobalScope(context)->GetThread(); 49 WorkerThread* thread = ToWorkerGlobalScope(context)->GetThread();
50 if (thread) 50 if (thread)
51 thread->GetInterfaceProvider()->GetInterface(std::move(request)); 51 thread->GetInterfaceProvider()->GetInterface(std::move(request));
52 } 52 }
53 53
54 manager_.set_connection_error_handler(ConvertToBaseCallback(WTF::Bind( 54 manager_.set_connection_error_handler(ConvertToBaseCallback(WTF::Bind(
55 &PaymentManager::OnServiceConnectionError, WrapWeakPersistent(this)))); 55 &PaymentManager::OnServiceConnectionError, WrapWeakPersistent(this))));
56 manager_->Init(registration_->scope()); 56 manager_->Init(registration_->GetExecutionContext()->Url().GetString(),
57 registration_->scope());
57 } 58 }
58 59
59 void PaymentManager::OnServiceConnectionError() { 60 void PaymentManager::OnServiceConnectionError() {
60 manager_.reset(); 61 manager_.reset();
61 } 62 }
62 63
63 } // namespace blink 64 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698