Chromium Code Reviews| Index: services/ui/demo/mus_demo_external.cc |
| diff --git a/services/ui/demo/mus_demo_external.cc b/services/ui/demo/mus_demo_external.cc |
| index f76c0a8dedbb0952bb9b9b23f555755a2acbb644..25ecc72887ed7d2994f32df56efb3c0327e5f732 100644 |
| --- a/services/ui/demo/mus_demo_external.cc |
| +++ b/services/ui/demo/mus_demo_external.cc |
| @@ -66,29 +66,19 @@ void MusDemoExternal::OnStartImpl() { |
| // aura::GetDeviceScaleFactorFromDisplay(). |
| AddPrimaryDisplay(display::Display(0)); |
| - // TODO(tonikitoo,fwang): New windows can be launched without need to wait |
| - // the respective ::OnEmbed call of the previous instance. |
| - OpenNewWindow(); |
| + for (size_t i = 0; i < number_of_windows_; ++i) |
| + OpenNewWindow(i); |
| } |
| -void MusDemoExternal::OpenNewWindow() { |
| +void MusDemoExternal::OpenNewWindow(size_t window_count) { |
|
fwang
2017/03/16 08:59:49
window_index
msisov(use msisov igalia.com)
2017/03/16 09:21:32
Done.
|
| AppendWindowTreeData(base::MakeUnique<WindowTreeDataExternal>( |
| - window_tree_client(), |
| - GetSquareSizeForWindow(initialized_windows_count_))); |
| + window_tree_client(), GetSquareSizeForWindow(window_count))); |
|
fwang
2017/03/16 08:59:49
window_index
msisov(use msisov igalia.com)
2017/03/16 09:21:32
Done.
|
| } |
| -void MusDemoExternal::OnEmbed( |
| - std::unique_ptr<aura::WindowTreeHostMus> window_tree_host) { |
| - DCHECK(!window_tree_host); |
| - |
| - // TODO: Clean up WindowTreeClientDelegate::OnEmbed API so that it passes |
| - // no ownership of WindowTreeHostMus instance. |
| - InitWindowTreeData(nullptr); |
| - initialized_windows_count_++; |
| - |
| - // Open the next window until the requested number of windows is reached. |
| - if (initialized_windows_count_ < number_of_windows_) |
| - OpenNewWindow(); |
| +void MusDemoExternal::OnEmbedRootReady( |
| + aura::WindowTreeHostMus* window_tree_host) { |
| + DCHECK(window_tree_host); |
| + InitWindowTreeDataExternal(window_tree_host); |
|
fwang
2017/03/16 08:59:48
I seems you can get rid of InitWindowTreeDataExter
msisov(use msisov igalia.com)
2017/03/16 09:21:32
Done.
|
| } |
| void MusDemoExternal::OnEmbedRootDestroyed( |