views: Remove dead code in CustomButton.

CustomButtonStateChangedDelegate was itnroduced in http://crrev.com/159994, and
its use was removed in http://crrev.com/185369 It hasn't been used since. So
remove the code.

BUG=none
R=tfarina@chromium.org

Review URL: https://codereview.chromium.org/872473004

Cr-Commit-Position: refs/heads/master@{#313515}
parent 8bfd8394
......@@ -73,8 +73,6 @@ void CustomButton::SetState(ButtonState state) {
state_ = state;
StateChanged();
if (state_changed_delegate_.get())
state_changed_delegate_->StateChanged(state_);
SchedulePaint();
}
......
......@@ -16,8 +16,6 @@ class ThrobAnimation;
namespace views {
class CustomButtonStateChangedDelegate;
// A button with custom rendering. The base of ImageButton and LabelButton.
// Note that this type of button is not focusable by default and will not be
// part of the focus chain. Call SetFocusable(true) to make it part of the
......@@ -89,11 +87,6 @@ class VIEWS_EXPORT CustomButton : public Button,
// Overridden from gfx::AnimationDelegate:
void AnimationProgressed(const gfx::Animation* animation) override;
// Takes ownership of the delegate.
void set_state_changed_delegate(CustomButtonStateChangedDelegate* delegate) {
state_changed_delegate_.reset(delegate);
}
protected:
// Construct the Button with a Listener. See comment for Button's ctor.
explicit CustomButton(ButtonListener* listener);
......@@ -137,24 +130,9 @@ class VIEWS_EXPORT CustomButton : public Button,
// See description above setter.
bool request_focus_on_press_;
scoped_ptr<CustomButtonStateChangedDelegate> state_changed_delegate_;
DISALLOW_COPY_AND_ASSIGN(CustomButton);
};
// Delegate for actions taken on state changes by CustomButton.
class VIEWS_EXPORT CustomButtonStateChangedDelegate {
public:
virtual ~CustomButtonStateChangedDelegate() {}
virtual void StateChanged(Button::ButtonState state) = 0;
protected:
CustomButtonStateChangedDelegate() {}
private:
DISALLOW_COPY_AND_ASSIGN(CustomButtonStateChangedDelegate);
};
} // namespace views
#endif // UI_VIEWS_CONTROLS_BUTTON_CUSTOM_BUTTON_H_
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