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

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

Issue 2656853002: [Web Payments] Refactor the row display code. (Closed)
Patch Set: Rebase Created 3 years, 10 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/ui/views/payments/payment_request_row_view.h"
6
7 #include "chrome/browser/ui/views/payments/payment_request_views_util.h"
8 #include "third_party/skia/include/core/SkColor.h"
9 #include "ui/views/background.h"
10 #include "ui/views/border.h"
11
12 namespace payments {
13
14 PaymentRequestRowView::PaymentRequestRowView(
15 views::ButtonListener* listener)
16 : views::CustomButton(listener) {
17 SetBorder(payments::CreatePaymentRequestRowBorder());
18 }
19
20 PaymentRequestRowView::~PaymentRequestRowView() {}
21
22 // views::CustomButton:
23 void PaymentRequestRowView::StateChanged() {
24 if (state() == views::Button::STATE_HOVERED ||
25 state() == views::Button::STATE_PRESSED) {
26 set_background(views::Background::CreateSolidBackground(SK_ColorLTGRAY));
27 } else {
28 set_background(nullptr);
29 }
30 }
31
32 } // namespace payments
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698