Commit 0dfdd72b authored by Sergey Talantov's avatar Sergey Talantov Committed by Commit Bot

Call CreateExampleView also for extra examples

Since ContainerView was eliminated here:
https://chromium-review.googlesource.com/c/chromium/src/+/1644758,
manual call of CreateExampleView is required now.
But for extra examples it is not called.

BUG=1026180

Change-Id: I891c6099ff742110b62d870236acfcc25039579a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1926131Reviewed-by: default avatarPeter Kasting <pkasting@chromium.org>
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#719057}
parent 47079bbb
......@@ -90,9 +90,6 @@ ExampleVector CreateExamples() {
examples.push_back(std::make_unique<TreeViewExample>());
examples.push_back(std::make_unique<VectorExample>());
examples.push_back(std::make_unique<WidgetExample>());
for (auto& example : examples)
example->CreateExampleView(example->example_view());
return examples;
}
......@@ -107,6 +104,9 @@ ExampleVector GetExamplesToShow(ExampleVector extra) {
ExampleVector examples = CreateExamples();
std::move(extra.begin(), extra.end(), std::back_inserter(examples));
std::sort(examples.begin(), examples.end(), ExampleTitleCompare());
for (auto& example : examples)
example->CreateExampleView(example->example_view());
return examples;
}
......
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