| 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 10 matching lines...) Expand all  Loading... | 
| 21 using payments::mojom::blink::PaymentAppOption; | 21 using payments::mojom::blink::PaymentAppOption; | 
| 22 using payments::mojom::blink::PaymentAppOptionPtr; | 22 using payments::mojom::blink::PaymentAppOptionPtr; | 
| 23 | 23 | 
| 24 template <> | 24 template <> | 
| 25 struct TypeConverter<PaymentAppOptionPtr, blink::PaymentAppOption> { | 25 struct TypeConverter<PaymentAppOptionPtr, blink::PaymentAppOption> { | 
| 26   static PaymentAppOptionPtr Convert(const blink::PaymentAppOption& input) { | 26   static PaymentAppOptionPtr Convert(const blink::PaymentAppOption& input) { | 
| 27     PaymentAppOptionPtr output = PaymentAppOption::New(); | 27     PaymentAppOptionPtr output = PaymentAppOption::New(); | 
| 28     output->name = input.hasName() ? input.name() : WTF::emptyString(); | 28     output->name = input.hasName() ? input.name() : WTF::emptyString(); | 
| 29     output->icon = input.hasIcon() ? input.icon() : WTF::String(); | 29     output->icon = input.hasIcon() ? input.icon() : WTF::String(); | 
| 30     output->id = input.hasId() ? input.id() : WTF::emptyString(); | 30     output->id = input.hasId() ? input.id() : WTF::emptyString(); | 
| 31     output->enabled_methods = WTF::Vector<WTF::String>(input.enabledMethods()); | 31     if (input.hasEnabledMethods()) { | 
|  | 32       output->enabled_methods = | 
|  | 33           WTF::Vector<WTF::String>(input.enabledMethods()); | 
|  | 34     } | 
| 32     return output; | 35     return output; | 
| 33   } | 36   } | 
| 34 }; | 37 }; | 
| 35 | 38 | 
| 36 template <> | 39 template <> | 
| 37 struct TypeConverter<PaymentAppManifestPtr, blink::PaymentAppManifest> { | 40 struct TypeConverter<PaymentAppManifestPtr, blink::PaymentAppManifest> { | 
| 38   static PaymentAppManifestPtr Convert(const blink::PaymentAppManifest& input) { | 41   static PaymentAppManifestPtr Convert(const blink::PaymentAppManifest& input) { | 
| 39     PaymentAppManifestPtr output = PaymentAppManifest::New(); | 42     PaymentAppManifestPtr output = PaymentAppManifest::New(); | 
| 40     output->name = input.hasName() ? input.name() : WTF::emptyString(); | 43     output->name = input.hasName() ? input.name() : WTF::emptyString(); | 
| 41     output->icon = input.hasIcon() ? input.icon() : WTF::String(); | 44     output->icon = input.hasIcon() ? input.icon() : WTF::String(); | 
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 192 | 195 | 
| 193 void PaymentAppManager::onServiceConnectionError() { | 196 void PaymentAppManager::onServiceConnectionError() { | 
| 194   if (!Platform::current()) { | 197   if (!Platform::current()) { | 
| 195     return; | 198     return; | 
| 196   } | 199   } | 
| 197 | 200 | 
| 198   m_manager.reset(); | 201   m_manager.reset(); | 
| 199 } | 202 } | 
| 200 | 203 | 
| 201 }  // namespace blink | 204 }  // namespace blink | 
| OLD | NEW | 
|---|