[Payment Request] Change the lifetime management of PaymentRequestImpl
Was previously 1 PaymentRequestImpl per WebContents. Now there is a
PaymentRequestWebContentsManager (1 per WebContents) that owns all the
PaymentRequestImpl's, whose raw pointers are shared with the delegate
and the mojo bindings.
Also, moving PaymentRequestImpl from chrome/ to components/ which creates
the need for a PaymentRequestDelegate (initially managing the Chrome
dialog).
BUG=678302
Review-Url: https://codereview.chromium.org/2611253004
Cr-Commit-Position: refs/heads/master@{#442335}
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index 269ec23..71cbdb7 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -3584,11 +3584,14 @@
if (is_linux || is_win) {
sources += [
- "payments/payment_request_impl.cc",
- "payments/payment_request_impl.h",
+ "payments/chrome_payment_request_delegate.cc",
+ "payments/chrome_payment_request_delegate.h",
+ "payments/payment_request_factory.cc",
+ "payments/payment_request_factory.h",
"renderer_context_menu/spelling_options_submenu_observer.cc",
"renderer_context_menu/spelling_options_submenu_observer.h",
]
+ deps += [ "//components/payments:payment_request_impl" ]
}
if (is_desktop_linux) {