Chromium Code Reviews| OLD | NEW |
|---|---|
| (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 } | |
|
sky
2017/01/25 21:45:20
Don't you need a SchedulePaint here? View should r
anthonyvd
2017/01/26 18:56:06
I doesn't *look* like it, CustomButton calls it it
| |
| 30 } | |
| 31 | |
| 32 } // namespace payments | |
| OLD | NEW |