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

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

Issue 2862913002: [Web Payments] Let subsheets define the initial focus (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 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_CVC_UNMASK_VIEW_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_PAYMENTS_CVC_UNMASK_VIEW_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_VIEWS_PAYMENTS_CVC_UNMASK_VIEW_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_VIEWS_PAYMENTS_CVC_UNMASK_VIEW_CONTROLLER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 base::string16 GetSheetTitle() override; 78 base::string16 GetSheetTitle() override;
79 void FillContentView(views::View* content_view) override; 79 void FillContentView(views::View* content_view) override;
80 std::unique_ptr<views::Button> CreatePrimaryButton() override; 80 std::unique_ptr<views::Button> CreatePrimaryButton() override;
81 void ButtonPressed(views::Button* sender, const ui::Event& event) override; 81 void ButtonPressed(views::Button* sender, const ui::Event& event) override;
82 82
83 private: 83 private:
84 // Called when the user confirms their CVC. This will pass the value to the 84 // Called when the user confirms their CVC. This will pass the value to the
85 // active FullCardRequest. 85 // active FullCardRequest.
86 void CvcConfirmed(); 86 void CvcConfirmed();
87 87
88 views::View* GetFirstFocusedView() override;
89
88 views::Textfield* cvc_field_; // owned by the view hierarchy, outlives this. 90 views::Textfield* cvc_field_; // owned by the view hierarchy, outlives this.
89 autofill::CreditCard credit_card_; 91 autofill::CreditCard credit_card_;
90 content::WebContents* web_contents_; 92 content::WebContents* web_contents_;
91 // The identity provider, used for Payments integration. 93 // The identity provider, used for Payments integration.
92 std::unique_ptr<IdentityProvider> identity_provider_; 94 std::unique_ptr<IdentityProvider> identity_provider_;
93 autofill::payments::PaymentsClient payments_client_; 95 autofill::payments::PaymentsClient payments_client_;
94 autofill::payments::FullCardRequest full_card_request_; 96 autofill::payments::FullCardRequest full_card_request_;
95 base::WeakPtr<autofill::CardUnmaskDelegate> unmask_delegate_; 97 base::WeakPtr<autofill::CardUnmaskDelegate> unmask_delegate_;
96 98
97 base::WeakPtrFactory<CvcUnmaskViewController> weak_ptr_factory_; 99 base::WeakPtrFactory<CvcUnmaskViewController> weak_ptr_factory_;
98 100
99 DISALLOW_COPY_AND_ASSIGN(CvcUnmaskViewController); 101 DISALLOW_COPY_AND_ASSIGN(CvcUnmaskViewController);
100 }; 102 };
101 103
102 } // namespace payments 104 } // namespace payments
103 105
104 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_CVC_UNMASK_VIEW_CONTROLLER_H_ 106 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_CVC_UNMASK_VIEW_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698