| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 UI_MESSAGE_CENTER_VIEWS_PADDED_BUTTON_H_ | 5 #ifndef UI_MESSAGE_CENTER_VIEWS_PADDED_BUTTON_H_ |
| 6 #define UI_MESSAGE_CENTER_VIEWS_PADDED_BUTTON_H_ | 6 #define UI_MESSAGE_CENTER_VIEWS_PADDED_BUTTON_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "ui/message_center/message_center_export.h" | 10 #include "ui/message_center/message_center_export.h" |
| 11 #include "ui/views/animation/ink_drop.h" |
| 12 #include "ui/views/animation/ink_drop_ripple.h" |
| 11 #include "ui/views/controls/button/image_button.h" | 13 #include "ui/views/controls/button/image_button.h" |
| 12 | 14 |
| 13 namespace message_center { | 15 namespace message_center { |
| 14 | 16 |
| 15 // PaddedButtons are ImageButtons whose image can be padded within the button. | 17 // PaddedButtons are ImageButtons whose image can be padded within the button. |
| 16 // This allows the creation of buttons like the notification close and expand | 18 // This allows the creation of buttons like the notification close and expand |
| 17 // buttons whose clickable areas extends beyond their image areas | 19 // buttons whose clickable areas extends beyond their image areas |
| 18 // (<http://crbug.com/168822>) without the need to create and maintain | 20 // (<http://crbug.com/168822>) without the need to create and maintain |
| 19 // corresponding resource images with alpha padding. In the future, this class | 21 // corresponding resource images with alpha padding. In the future, this class |
| 20 // will also allow for buttons whose touch areas extend beyond their clickable | 22 // will also allow for buttons whose touch areas extend beyond their clickable |
| 21 // area (<http://crbug.com/168856>). | 23 // area (<http://crbug.com/168856>). |
| 22 class MESSAGE_CENTER_EXPORT PaddedButton : public views::ImageButton { | 24 class MESSAGE_CENTER_EXPORT PaddedButton : public views::ImageButton { |
| 23 public: | 25 public: |
| 24 PaddedButton(views::ButtonListener* listener); | 26 PaddedButton(views::ButtonListener* listener); |
| 25 ~PaddedButton() override; | 27 ~PaddedButton() override = default; |
| 28 |
| 29 // Overridden from InkDropHostView |
| 30 std::unique_ptr<views::InkDrop> CreateInkDrop() override; |
| 31 std::unique_ptr<views::InkDropRipple> CreateInkDropRipple() const override; |
| 26 | 32 |
| 27 private: | 33 private: |
| 28 DISALLOW_COPY_AND_ASSIGN(PaddedButton); | 34 DISALLOW_COPY_AND_ASSIGN(PaddedButton); |
| 29 }; | 35 }; |
| 30 | 36 |
| 31 } // namespace message_center | 37 } // namespace message_center |
| 32 | 38 |
| 33 #endif // UI_MESSAGE_CENTER_VIEWS_PADDED_BUTTON_H_ | 39 #endif // UI_MESSAGE_CENTER_VIEWS_PADDED_BUTTON_H_ |
| OLD | NEW |