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

Unified Diff: components/payments/content/payment_request_web_contents_manager.h

Issue 2870153002: [Payments] Record navigations that close the Payment Request as aborts. (Closed)
Patch Set: Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: components/payments/content/payment_request_web_contents_manager.h
diff --git a/components/payments/content/payment_request_web_contents_manager.h b/components/payments/content/payment_request_web_contents_manager.h
index be08a3da0035226eb91044d9d85b61fd37c81ff8..7daea11f577ad278fbfb8c8ff8404ab64db449e3 100644
--- a/components/payments/content/payment_request_web_contents_manager.h
+++ b/components/payments/content/payment_request_web_contents_manager.h
@@ -11,12 +11,14 @@
#include "base/macros.h"
#include "components/payments/content/payment_request.h"
#include "components/payments/mojom/payment_request.mojom.h"
+#include "content/public/browser/web_contents_observer.h"
#include "content/public/browser/web_contents_user_data.h"
#include "mojo/public/cpp/bindings/binding.h"
namespace content {
+class NavigationHandle;
class WebContents;
-}
+} // namespace content
namespace payments {
@@ -30,7 +32,8 @@ class PaymentRequestDelegate;
// it is ready to die. Otherwise it gets destroyed when the WebContents (thus
// this class) goes away.
class PaymentRequestWebContentsManager
- : public content::WebContentsUserData<PaymentRequestWebContentsManager> {
+ : public content::WebContentsObserver,
+ public content::WebContentsUserData<PaymentRequestWebContentsManager> {
public:
~PaymentRequestWebContentsManager() override;
@@ -50,6 +53,10 @@ class PaymentRequestWebContentsManager
// Destroys the given |request|.
void DestroyRequest(PaymentRequest* request);
+ // WebContentsObserver::
+ void DidStartNavigation(
+ content::NavigationHandle* navigation_handle) override;
+
private:
explicit PaymentRequestWebContentsManager(content::WebContents* web_contents);
friend class content::WebContentsUserData<PaymentRequestWebContentsManager>;

Powered by Google App Engine
This is Rietveld 408576698