Commit 7e3f354c authored by Peter Kasting's avatar Peter Kasting Committed by Commit Bot

Remove various non-executing references to "ButtonListener".

Bug: 772945
Change-Id: Ib78e6fbdb96503f4ce6687b07300f0421fb3d26d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2519834
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Commit-Queue: Scott Violet <sky@chromium.org>
Reviewed-by: default avatarScott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#824130}
parent a962190d
......@@ -194,7 +194,7 @@ class AnimationSpeedControl : public views::SliderListener, public views::View {
~AnimationSpeedControl() override;
// views::ButtonListener:
// views::SliderListener:
void SliderValueChanged(views::Slider* sender,
float value,
float old_value,
......
......@@ -24,8 +24,7 @@ class ShelfButton;
// TODO(mohsen): A better approach would be to return a value indicating the
// type of action performed such that the button can animate the ink drop.
// Currently, it is not possible because showing menu is synchronous and blocks
// the call. Fix this after menu is converted to asynchronous. Long-term, the
// return value can be merged into ButtonListener.
// the call. Fix this after menu is converted to asynchronous.
class ShelfButtonDelegate {
public:
class ScopedActiveInkDropCount {
......
......@@ -92,8 +92,7 @@ theme changes, including when a `View` is first shown.
``` cpp
class ThemeTrackingCheckbox : public views::Checkbox,
public views::ButtonListener {
class ThemeTrackingCheckbox : public views::Checkbox {
public:
explicit ThemeTrackingCheckbox(const base::string16& label)
: Checkbox(label, this) {}
......@@ -110,8 +109,7 @@ class ThemeTrackingCheckbox : public views::Checkbox,
SetChecked(GetNativeTheme()->ShouldUseDarkColors());
}
// views::ButtonListener:
void ButtonPressed(views::Button* sender, const ui::Event& event) override {
void ButtonPressed() {
GetNativeTheme()->set_use_dark_colors(GetChecked());
// An OS or Chrome theme change would do this automatically.
......@@ -138,7 +136,9 @@ theme changes.
``` cpp
AddChildView(std::make_unique<TextVectorImageButton>(
this, l10n_util::GetStringUTF16(IDS_COLORED_DIALOG_CHOOSER_BUTTON),
base::BindRepeating(&ColoredDialogChooser::ButtonPressed,
base::Unretained(this)),
l10n_util::GetStringUTF16(IDS_COLORED_DIALOG_CHOOSER_BUTTON),
views::kInfoIcon));
```
......@@ -153,10 +153,10 @@ change.
``` cpp
class TextVectorImageButton : public views::MdTextButton {
public:
TextVectorImageButton(ButtonListener* listener,
TextVectorImageButton(PressedCallback callback,
const base::string16& text,
const gfx::VectorIcon& icon)
: MdTextButton(listener, text), icon_(icon) {}
: MdTextButton(std::move(callback), text), icon_(icon) {}
TextVectorImageButton(const TextVectorImageButton&) = delete;
TextVectorImageButton& operator=(const TextVectorImageButton&) = delete;
~TextVectorImageButton() override = default;
......
......@@ -512,13 +512,12 @@ in clearer code.
// | | subtitle | |
// +-----------+---------------------+----------------+
HoverButton::HoverButton(
views::ButtonListener* button_listener,
...
std::unique_ptr<views::View> icon_view,
const base::string16& title,
const base::string16& subtitle,
std::unique_ptr<views::View> secondary_view,
bool resize_row_for_secondary_view,
bool secondary_view_can_process_events) {
...) {
...
views::GridLayout* grid_layout =
SetLayoutManager(
......@@ -591,13 +590,12 @@ HoverButton::HoverButton(
// | | subtitle | |
// +-----------+---------------------+----------------+
HoverButton::HoverButton(
views::ButtonListener* button_listener,
...
std::unique_ptr<views::View> icon_view,
const base::string16& title,
const base::string16& subtitle,
std::unique_ptr<views::View> secondary_view,
bool resize_row_for_secondary_view,
bool secondary_view_can_process_events) {
...) {
...
SetLayoutManager(
std::make_unique<views::FlexLayout>())
......
......@@ -289,8 +289,7 @@ destroyed:
#####
``` cpp
class CastDialogNoSinksView
: public views::View, public views::ButtonListener {
class CastDialogNoSinksView ... {
...
private:
base::WeakPtrFactory<CastDialogNoSinksView>
......@@ -313,8 +312,7 @@ CastDialogNoSinksView::CastDialogNoSinksView(
#####
``` cpp
class CastDialogNoSinksView
: public views::View, public views::ButtonListener {
class CastDialogNoSinksView ... {
...
private:
base::OneShotTimer timer_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment