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

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

Issue 2734693002: [Payments] Convert interactive tests to browsertests (Closed)
Patch Set: Initial Created 3 years, 9 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') | no next file » | 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 <memory> 8 #include <memory>
9 #include <unordered_map> 9 #include <unordered_map>
10 10
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 content::WebContents* web_contents, 45 content::WebContents* web_contents,
46 std::unique_ptr<PaymentRequestDelegate> delegate, 46 std::unique_ptr<PaymentRequestDelegate> delegate,
47 mojo::InterfaceRequest<payments::mojom::PaymentRequest> request); 47 mojo::InterfaceRequest<payments::mojom::PaymentRequest> request);
48 48
49 // Destroys the given |request|. 49 // Destroys the given |request|.
50 void DestroyRequest(PaymentRequest* request); 50 void DestroyRequest(PaymentRequest* request);
51 51
52 private: 52 private:
53 explicit PaymentRequestWebContentsManager(content::WebContents* web_contents); 53 explicit PaymentRequestWebContentsManager(content::WebContents* web_contents);
54 friend class content::WebContentsUserData<PaymentRequestWebContentsManager>; 54 friend class content::WebContentsUserData<PaymentRequestWebContentsManager>;
55 friend class PaymentRequestInteractiveTestBase; 55 friend class PaymentRequestBrowserTestBase;
56 56
57 // Owns all the PaymentRequest for this WebContents. Since the 57 // Owns all the PaymentRequest for this WebContents. Since the
58 // PaymentRequestWebContentsManager's lifetime is tied to the WebContents, 58 // PaymentRequestWebContentsManager's lifetime is tied to the WebContents,
59 // these requests only get destroyed when the WebContents goes away, or when 59 // these requests only get destroyed when the WebContents goes away, or when
60 // the requests themselves call DestroyRequest(). 60 // the requests themselves call DestroyRequest().
61 std::unordered_map<PaymentRequest*, std::unique_ptr<PaymentRequest>> 61 std::unordered_map<PaymentRequest*, std::unique_ptr<PaymentRequest>>
62 payment_requests_; 62 payment_requests_;
63 63
64 DISALLOW_COPY_AND_ASSIGN(PaymentRequestWebContentsManager); 64 DISALLOW_COPY_AND_ASSIGN(PaymentRequestWebContentsManager);
65 }; 65 };
66 66
67 } // namespace payments 67 } // namespace payments
68 68
69 #endif // COMPONENTS_PAYMENTS_PAYMENT_REQUEST_WEB_CONTENTS_MANAGER_H_ 69 #endif // COMPONENTS_PAYMENTS_PAYMENT_REQUEST_WEB_CONTENTS_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/test/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698