Commit 477a0f3f authored by Wei Li's avatar Wei Li Committed by Commit Bot

Make ScrollBarView default constructible

Use default argument true for creating a horizontal ScrollBarViews by
default.

Bug: 1108460
Change-Id: Ic19c4e34e6c06372d9004ccbb9d17cc72d31c9cd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2427525Reviewed-by: default avatarScott Violet <sky@chromium.org>
Commit-Queue: Wei Li <weili@chromium.org>
Cr-Commit-Position: refs/heads/master@{#810298}
parent 3cbd841c
......@@ -25,7 +25,7 @@ class VIEWS_EXPORT ScrollBarViews : public ScrollBar, public ButtonListener {
METADATA_HEADER(ScrollBarViews);
// Creates new scrollbar, either horizontal or vertical.
explicit ScrollBarViews(bool horizontal);
explicit ScrollBarViews(bool horizontal = true);
~ScrollBarViews() override;
static int GetVerticalScrollBarWidth(const ui::NativeTheme* theme);
......
......@@ -86,8 +86,7 @@ class ScrollBarViewsTest : public ViewsTestBase {
auto* container =
widget_->SetContentsView(std::make_unique<TestScrollbarContainer>());
scrollbar_ =
container->AddChildView(std::make_unique<ScrollBarViews>(true));
scrollbar_ = container->AddChildView(std::make_unique<ScrollBarViews>());
scrollbar_->SetBounds(0, 0, 100, 100);
scrollbar_->Update(100, 1000, 0);
scrollbar_->set_controller(controller_.get());
......
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