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 { ...@@ -194,7 +194,7 @@ class AnimationSpeedControl : public views::SliderListener, public views::View {
~AnimationSpeedControl() override; ~AnimationSpeedControl() override;
// views::ButtonListener: // views::SliderListener:
void SliderValueChanged(views::Slider* sender, void SliderValueChanged(views::Slider* sender,
float value, float value,
float old_value, float old_value,
......
...@@ -24,8 +24,7 @@ class ShelfButton; ...@@ -24,8 +24,7 @@ class ShelfButton;
// TODO(mohsen): A better approach would be to return a value indicating the // 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. // 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 // 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 // the call. Fix this after menu is converted to asynchronous.
// return value can be merged into ButtonListener.
class ShelfButtonDelegate { class ShelfButtonDelegate {
public: public:
class ScopedActiveInkDropCount { class ScopedActiveInkDropCount {
......
...@@ -92,8 +92,7 @@ theme changes, including when a `View` is first shown. ...@@ -92,8 +92,7 @@ theme changes, including when a `View` is first shown.
``` cpp ``` cpp
class ThemeTrackingCheckbox : public views::Checkbox, class ThemeTrackingCheckbox : public views::Checkbox {
public views::ButtonListener {
public: public:
explicit ThemeTrackingCheckbox(const base::string16& label) explicit ThemeTrackingCheckbox(const base::string16& label)
: Checkbox(label, this) {} : Checkbox(label, this) {}
...@@ -110,8 +109,7 @@ class ThemeTrackingCheckbox : public views::Checkbox, ...@@ -110,8 +109,7 @@ class ThemeTrackingCheckbox : public views::Checkbox,
SetChecked(GetNativeTheme()->ShouldUseDarkColors()); SetChecked(GetNativeTheme()->ShouldUseDarkColors());
} }
// views::ButtonListener: void ButtonPressed() {
void ButtonPressed(views::Button* sender, const ui::Event& event) override {
GetNativeTheme()->set_use_dark_colors(GetChecked()); GetNativeTheme()->set_use_dark_colors(GetChecked());
// An OS or Chrome theme change would do this automatically. // An OS or Chrome theme change would do this automatically.
...@@ -138,7 +136,9 @@ theme changes. ...@@ -138,7 +136,9 @@ theme changes.
``` cpp ``` cpp
AddChildView(std::make_unique<TextVectorImageButton>( 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)); views::kInfoIcon));
``` ```
...@@ -153,10 +153,10 @@ change. ...@@ -153,10 +153,10 @@ change.
``` cpp ``` cpp
class TextVectorImageButton : public views::MdTextButton { class TextVectorImageButton : public views::MdTextButton {
public: public:
TextVectorImageButton(ButtonListener* listener, TextVectorImageButton(PressedCallback callback,
const base::string16& text, const base::string16& text,
const gfx::VectorIcon& icon) const gfx::VectorIcon& icon)
: MdTextButton(listener, text), icon_(icon) {} : MdTextButton(std::move(callback), text), icon_(icon) {}
TextVectorImageButton(const TextVectorImageButton&) = delete; TextVectorImageButton(const TextVectorImageButton&) = delete;
TextVectorImageButton& operator=(const TextVectorImageButton&) = delete; TextVectorImageButton& operator=(const TextVectorImageButton&) = delete;
~TextVectorImageButton() override = default; ~TextVectorImageButton() override = default;
......
...@@ -512,13 +512,12 @@ in clearer code. ...@@ -512,13 +512,12 @@ in clearer code.
// | | subtitle | | // | | subtitle | |
// +-----------+---------------------+----------------+ // +-----------+---------------------+----------------+
HoverButton::HoverButton( HoverButton::HoverButton(
views::ButtonListener* button_listener, ...
std::unique_ptr<views::View> icon_view, std::unique_ptr<views::View> icon_view,
const base::string16& title, const base::string16& title,
const base::string16& subtitle, const base::string16& subtitle,
std::unique_ptr<views::View> secondary_view, std::unique_ptr<views::View> secondary_view,
bool resize_row_for_secondary_view, ...) {
bool secondary_view_can_process_events) {
... ...
views::GridLayout* grid_layout = views::GridLayout* grid_layout =
SetLayoutManager( SetLayoutManager(
...@@ -591,13 +590,12 @@ HoverButton::HoverButton( ...@@ -591,13 +590,12 @@ HoverButton::HoverButton(
// | | subtitle | | // | | subtitle | |
// +-----------+---------------------+----------------+ // +-----------+---------------------+----------------+
HoverButton::HoverButton( HoverButton::HoverButton(
views::ButtonListener* button_listener, ...
std::unique_ptr<views::View> icon_view, std::unique_ptr<views::View> icon_view,
const base::string16& title, const base::string16& title,
const base::string16& subtitle, const base::string16& subtitle,
std::unique_ptr<views::View> secondary_view, std::unique_ptr<views::View> secondary_view,
bool resize_row_for_secondary_view, ...) {
bool secondary_view_can_process_events) {
... ...
SetLayoutManager( SetLayoutManager(
std::make_unique<views::FlexLayout>()) std::make_unique<views::FlexLayout>())
......
...@@ -289,8 +289,7 @@ destroyed: ...@@ -289,8 +289,7 @@ destroyed:
##### #####
``` cpp ``` cpp
class CastDialogNoSinksView class CastDialogNoSinksView ... {
: public views::View, public views::ButtonListener {
... ...
private: private:
base::WeakPtrFactory<CastDialogNoSinksView> base::WeakPtrFactory<CastDialogNoSinksView>
...@@ -313,8 +312,7 @@ CastDialogNoSinksView::CastDialogNoSinksView( ...@@ -313,8 +312,7 @@ CastDialogNoSinksView::CastDialogNoSinksView(
##### #####
``` cpp ``` cpp
class CastDialogNoSinksView class CastDialogNoSinksView ... {
: public views::View, public views::ButtonListener {
... ...
private: private:
base::OneShotTimer timer_; 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