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

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: Fixed Windows error 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 1d4a538ecb05efec852af6fff3ae48f4b426f3b0..25a47effca13663bb455085c891d9e67b3561460 100644
--- a/components/payments/content/payment_request_web_contents_manager.h
+++ b/components/payments/content/payment_request_web_contents_manager.h
@@ -11,13 +11,15 @@
#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 RenderFrameHost;
+class NavigationHandle;
class WebContents;
-}
+} // namespace content
namespace payments {
@@ -31,7 +33,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;
@@ -59,6 +62,10 @@ class PaymentRequestWebContentsManager
// request at a time can be shown per tab.)
bool CanShow(PaymentRequest* request);
+ // WebContentsObserver::
+ void DidStartNavigation(
+ content::NavigationHandle* navigation_handle) override;
+
private:
explicit PaymentRequestWebContentsManager(content::WebContents* web_contents);
friend class content::WebContentsUserData<PaymentRequestWebContentsManager>;
« no previous file with comments | « components/payments/content/payment_request.cc ('k') | components/payments/content/payment_request_web_contents_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698