Commit fa8c4378 authored by Danan S's avatar Danan S Committed by Commit Bot

Add property change observer to checked_ property of CheckBox

Bug: 957832
Change-Id: Ieaf37b911a29bdf6462cf9a3e4faf81578a2d5f0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2086558
Commit-Queue: Dan S <danan@chromium.org>
Reviewed-by: default avatarScott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#746947}
parent 7c288a35
......@@ -80,6 +80,11 @@ bool Checkbox::GetChecked() const {
return checked_;
}
PropertyChangedSubscription Checkbox::AddCheckedChangedCallback(
PropertyChangedCallback callback) {
return AddPropertyChangedCallback(&checked_, callback);
}
void Checkbox::SetMultiLine(bool multi_line) {
if (GetMultiLine() == multi_line)
return;
......
......@@ -35,6 +35,9 @@ class VIEWS_EXPORT Checkbox : public LabelButton {
virtual void SetChecked(bool checked);
bool GetChecked() const;
PropertyChangedSubscription AddCheckedChangedCallback(
PropertyChangedCallback callback) WARN_UNUSED_RESULT;
void SetMultiLine(bool multi_line);
bool GetMultiLine() const;
......
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