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

Side by Side Diff: chrome/browser/ui/views/payments/test_chrome_payment_request_delegate.h

Issue 2772103002: [Payments] Desktop: never return false in incognito mode for canMakePayment (Closed)
Patch Set: 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
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 CHROME_BROWSER_UI_VIEWS_PAYMENTS_TEST_CHROME_PAYMENT_REQUEST_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_PAYMENTS_TEST_CHROME_PAYMENT_REQUEST_DELEGATE_H_
6 #define CHROME_BROWSER_UI_VIEWS_PAYMENTS_TEST_CHROME_PAYMENT_REQUEST_DELEGATE_H_ 6 #define CHROME_BROWSER_UI_VIEWS_PAYMENTS_TEST_CHROME_PAYMENT_REQUEST_DELEGATE_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "chrome/browser/payments/chrome_payment_request_delegate.h" 9 #include "chrome/browser/payments/chrome_payment_request_delegate.h"
10 #include "chrome/browser/ui/views/payments/payment_request_dialog_view.h" 10 #include "chrome/browser/ui/views/payments/payment_request_dialog_view.h"
11 11
12 namespace content { 12 namespace content {
13 class WebContents; 13 class WebContents;
14 } 14 }
15 15
16 namespace views { 16 namespace views {
17 class WidgetObserver; 17 class WidgetObserver;
18 } 18 }
19 19
20 namespace payments { 20 namespace payments {
21 21
22 class PaymentRequest; 22 class PaymentRequest;
23 23
24 // Implementation of the Payment Request delegate used in tests. 24 // Implementation of the Payment Request delegate used in tests.
25 class TestChromePaymentRequestDelegate : public ChromePaymentRequestDelegate { 25 class TestChromePaymentRequestDelegate : public ChromePaymentRequestDelegate {
26 public: 26 public:
27 TestChromePaymentRequestDelegate( 27 TestChromePaymentRequestDelegate(
28 content::WebContents* web_contents, 28 content::WebContents* web_contents,
29 PaymentRequestDialogView::ObserverForTest* observer, 29 PaymentRequestDialogView::ObserverForTest* observer,
30 views::WidgetObserver* widget_observer); 30 views::WidgetObserver* widget_observer,
31 bool is_incognito);
31 32
32 void ShowDialog(PaymentRequest* request) override; 33 void ShowDialog(PaymentRequest* request) override;
34 bool IsIncognito() const override;
33 35
34 PaymentRequestDialogView* dialog_view() { 36 PaymentRequestDialogView* dialog_view() {
35 return static_cast<PaymentRequestDialogView*>(dialog_); 37 return static_cast<PaymentRequestDialogView*>(dialog_);
36 } 38 }
37 39
38 private: 40 private:
39 PaymentRequestDialogView::ObserverForTest* observer_; 41 PaymentRequestDialogView::ObserverForTest* observer_;
40 views::WidgetObserver* widget_observer_; 42 views::WidgetObserver* widget_observer_;
43 bool is_incognito_for_testing_;
41 44
42 DISALLOW_COPY_AND_ASSIGN(TestChromePaymentRequestDelegate); 45 DISALLOW_COPY_AND_ASSIGN(TestChromePaymentRequestDelegate);
43 }; 46 };
44 47
45 } // namespace payments 48 } // namespace payments
46 49
47 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_TEST_CHROME_PAYMENT_REQUEST_DELEGATE _H_ 50 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_TEST_CHROME_PAYMENT_REQUEST_DELEGATE _H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698