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

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

Issue 2853163002: [Web Payments] Implement proper focusing in Payment Request (Closed)
Patch Set: Allow ViewControllers to specify their first focused view 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_PAYMENT_REQUEST_ROW_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_ROW_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_ROW_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_ROW_VIEW_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "ui/views/controls/button/custom_button.h" 9 #include "ui/views/controls/button/custom_button.h"
10 10
11 namespace payments { 11 namespace payments {
12 12
13 // This class implements a clickable row of the Payment Request dialog that 13 // This class implements a clickable row of the Payment Request dialog that
14 // darkens on hover and displays a horizontal ruler on its lower bound. 14 // darkens on hover and displays a horizontal ruler on its lower bound.
15 class PaymentRequestRowView : public views::CustomButton { 15 class PaymentRequestRowView : public views::CustomButton {
16 public: 16 public:
17 // Creates a row view. If |clickable| is true, the row will be shaded on hover 17 // Creates a row view. If |clickable| is true, the row will be shaded on hover
18 // and handle click events. 18 // and handle click events.
19 PaymentRequestRowView(views::ButtonListener* listener, bool clickable); 19 PaymentRequestRowView(views::ButtonListener* listener, bool clickable);
20 ~PaymentRequestRowView() override; 20 ~PaymentRequestRowView() override;
21 21
22 // views::CustomButton: 22 // views::CustomButton:
23 void StateChanged(ButtonState old_state) override; 23 void StateChanged(ButtonState old_state) override;
24 24
25 // views::View:
26 void OnFocus() override;
27 void OnBlur() override;
28
25 private: 29 private:
26 bool clickable_; 30 bool clickable_;
27 31
28 DISALLOW_COPY_AND_ASSIGN(PaymentRequestRowView); 32 DISALLOW_COPY_AND_ASSIGN(PaymentRequestRowView);
29 }; 33 };
30 34
31 } // namespace payments 35 } // namespace payments
32 36
33 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_ROW_VIEW_H_ 37 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_ROW_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698