OLD | NEW |
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/PaymentAppManager.h" | 5 #include "modules/payments/PaymentAppManager.h" |
6 | 6 |
7 #include "bindings/core/v8/ScriptPromise.h" | 7 #include "bindings/core/v8/ScriptPromise.h" |
8 #include "bindings/core/v8/ScriptState.h" | 8 #include "bindings/core/v8/ScriptState.h" |
9 #include "core/dom/DOMException.h" | 9 #include "core/dom/DOMException.h" |
10 #include "modules/payments/PaymentAppManifest.h" | 10 #include "modules/payments/PaymentAppManifest.h" |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 } | 129 } |
130 | 130 |
131 DEFINE_TRACE(PaymentAppManager) { | 131 DEFINE_TRACE(PaymentAppManager) { |
132 visitor->trace(m_registration); | 132 visitor->trace(m_registration); |
133 } | 133 } |
134 | 134 |
135 PaymentAppManager::PaymentAppManager(ServiceWorkerRegistration* registration) | 135 PaymentAppManager::PaymentAppManager(ServiceWorkerRegistration* registration) |
136 : m_registration(registration) { | 136 : m_registration(registration) { |
137 DCHECK(registration); | 137 DCHECK(registration); |
138 Platform::current()->interfaceProvider()->getInterface( | 138 Platform::current()->interfaceProvider()->getInterface( |
139 mojo::GetProxy(&m_manager)); | 139 mojo::MakeRequest(&m_manager)); |
140 | 140 |
141 m_manager.set_connection_error_handler(convertToBaseCallback(WTF::bind( | 141 m_manager.set_connection_error_handler(convertToBaseCallback(WTF::bind( |
142 &PaymentAppManager::onServiceConnectionError, wrapWeakPersistent(this)))); | 142 &PaymentAppManager::onServiceConnectionError, wrapWeakPersistent(this)))); |
143 } | 143 } |
144 | 144 |
145 void PaymentAppManager::onSetManifest( | 145 void PaymentAppManager::onSetManifest( |
146 ScriptPromiseResolver* resolver, | 146 ScriptPromiseResolver* resolver, |
147 payments::mojom::blink::PaymentAppManifestError error) { | 147 payments::mojom::blink::PaymentAppManifestError error) { |
148 DCHECK(resolver); | 148 DCHECK(resolver); |
149 switch (error) { | 149 switch (error) { |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 | 192 |
193 void PaymentAppManager::onServiceConnectionError() { | 193 void PaymentAppManager::onServiceConnectionError() { |
194 if (!Platform::current()) { | 194 if (!Platform::current()) { |
195 return; | 195 return; |
196 } | 196 } |
197 | 197 |
198 m_manager.reset(); | 198 m_manager.reset(); |
199 } | 199 } |
200 | 200 |
201 } // namespace blink | 201 } // namespace blink |
OLD | NEW |