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

Clean up text_example.* some.

Remove DISALLOW_COPY, use constexpr more, move constants as close to
first use as possible, etc.

This was originally motivated by wanting to change the
Combobox::set_callback() call to set_closure(); that's present here, but
I couldn't help cleaning up at least some of the rest of this too.

Bug: none
Change-Id: I5539b0b9d11a534d059107f57dd91d0f65b7a0a0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2420778
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Reviewed-by: default avatarRobert Liao <robliao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#809159}
parent a0b8d64a
This diff is collapsed.
......@@ -32,13 +32,19 @@ class VIEWS_EXAMPLES_EXPORT TextExample : public ExampleBase,
// Creates and adds a check box to the layout.
Checkbox* AddCheckbox(GridLayout* layout, const char* name);
// Creates and adds a combobox to the layout.
// Creates and adds a combobox to the layout. Sets |this|' instance of
// |combobox_callback| as the callback for the created combobox.
Combobox* AddCombobox(GridLayout* layout,
const char* name,
const char* const* strings,
int count);
void OnPerformAction(Combobox* combobox);
int count,
void (TextExample::*combobox_callback)());
void AlignComboboxChanged();
void TextComboboxChanged();
void ElideComboboxChanged();
void PrefixComboboxChanged();
void WeightComboboxChanged();
// ButtonListener:
void ButtonPressed(Button* button, const ui::Event& event) override;
......
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