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

Side by Side Diff: components/payments/payment_request_web_contents_manager.h

Issue 2631133003: [Payments] Introduce basic interactive browsertests for Payment Request (Closed)
Patch Set: ObserverForTest Created 3 years, 11 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 unified diff | Download patch
« no previous file with comments | « chrome/test/BUILD.gn ('k') | components/payments/payment_request_web_contents_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 #ifndef COMPONENTS_PAYMENTS_PAYMENT_REQUEST_WEB_CONTENTS_MANAGER_H_ 5 #ifndef COMPONENTS_PAYMENTS_PAYMENT_REQUEST_WEB_CONTENTS_MANAGER_H_
6 #define COMPONENTS_PAYMENTS_PAYMENT_REQUEST_WEB_CONTENTS_MANAGER_H_ 6 #define COMPONENTS_PAYMENTS_PAYMENT_REQUEST_WEB_CONTENTS_MANAGER_H_
7 7
8 #include <unordered_map> 8 #include <unordered_map>
9 9
10 #include "components/payments/payment_request.h" 10 #include "components/payments/payment_request.h"
(...skipping 28 matching lines...) Expand all
39 content::WebContents* web_contents, 39 content::WebContents* web_contents,
40 std::unique_ptr<PaymentRequestDelegate> delegate, 40 std::unique_ptr<PaymentRequestDelegate> delegate,
41 mojo::InterfaceRequest<payments::mojom::PaymentRequest> request); 41 mojo::InterfaceRequest<payments::mojom::PaymentRequest> request);
42 42
43 // Destroys the given |request|. 43 // Destroys the given |request|.
44 void DestroyRequest(PaymentRequest* request); 44 void DestroyRequest(PaymentRequest* request);
45 45
46 private: 46 private:
47 explicit PaymentRequestWebContentsManager(content::WebContents* web_contents); 47 explicit PaymentRequestWebContentsManager(content::WebContents* web_contents);
48 friend class content::WebContentsUserData<PaymentRequestWebContentsManager>; 48 friend class content::WebContentsUserData<PaymentRequestWebContentsManager>;
49 friend class PaymentRequestWebContentsManagerBrowserTest; 49 friend class PaymentRequestInteractiveTestBase;
50 50
51 // Owns all the PaymentRequest for this WebContents. Since the 51 // Owns all the PaymentRequest for this WebContents. Since the
52 // PaymentRequestWebContentsManager's lifetime is tied to the WebContents, 52 // PaymentRequestWebContentsManager's lifetime is tied to the WebContents,
53 // these requests only get destroyed when the WebContents goes away, or when 53 // these requests only get destroyed when the WebContents goes away, or when
54 // the requests themselves call DestroyRequest(). 54 // the requests themselves call DestroyRequest().
55 std::unordered_map<PaymentRequest*, std::unique_ptr<PaymentRequest>> 55 std::unordered_map<PaymentRequest*, std::unique_ptr<PaymentRequest>>
56 payment_requests_; 56 payment_requests_;
57 }; 57 };
58 58
59 } // namespace payments 59 } // namespace payments
60 60
61 #endif // COMPONENTS_PAYMENTS_PAYMENT_REQUEST_IMPL_H_ 61 #endif // COMPONENTS_PAYMENTS_PAYMENT_REQUEST_WEB_CONTENTS_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/test/BUILD.gn ('k') | components/payments/payment_request_web_contents_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698