Chromium Code Reviews| Index: services/ui/demo/mus_demo.h |
| diff --git a/services/ui/demo/mus_demo.h b/services/ui/demo/mus_demo.h |
| index 251a505818c42e56c559e517e5f1437bc7e9895c..4f6910b79b9fb2bd80b75cf22378c6e6f6115899 100644 |
| --- a/services/ui/demo/mus_demo.h |
| +++ b/services/ui/demo/mus_demo.h |
| @@ -46,17 +46,24 @@ class MusDemo : public service_manager::Service, |
| void AddPrimaryDisplay(const display::Display& display); |
| // These functions help to manage the list of WindowTreeData structures. |
| - // AppendWindowTreeData is used to add an uninitialized structure at the end |
| + // AppendWindowTreeData is used to add uninitialized structures at the end |
| // of the list. When a new WindowTreeHostMus is created and is sent to |
| - // MusDemo (via OnWmNewDisplay or OnEmbed), the WindowTreeData is initialized |
| - // by a call to InitWindowTreeData and the demo starts. When the destruction |
| - // of the WindowTreeHostMus is announced to MusDemo (via OnWmDisplayRemoved |
| - // or OnEmbedRootDestroyed), the corresponding WindowTreeData is removed by |
| - // a call to RemoveWindowTreeData. |
| + // MusDemo via OnWmNewDisplay, the WindowTreeData is initialized |
| + // by a call to InitWindowTreeData and the demo starts. In case if |
| + // OnEmbedRootReady is called, corresponding WindowTreeData is found by |
| + // looking associated WindowTreeHostMus with it. When the destruction of the |
| + // WindowTreeHostMus is announced to MusDemo (via OnWmDisplayRemoved or |
| + // OnEmbedRootDestroyed), the corresponding WindowTreeData is removed by a |
| + // call to RemoveWindowTreeData. |
| void AppendWindowTreeData(std::unique_ptr<WindowTreeData> window_tree_data); |
| void InitWindowTreeData( |
| std::unique_ptr<aura::WindowTreeHostMus> window_tree_host); |
| + // Is called in case if OnEmbedRootReady is called. Uses WindowTreeHostMus* |
| + // to find an associated WindowTreeData with it. |
| + void InitWindowTreeDataExternal(aura::WindowTreeHostMus* window_tree_host); |
|
fwang
2017/03/16 08:59:48
I would make HasPendingWindowTreeData protected an
msisov(use msisov igalia.com)
2017/03/16 09:21:32
Agree, HasPendingWindowTreeData is not longer need
|
| void RemoveWindowTreeData(aura::WindowTreeHostMus* window_tree_host); |
| + std::vector<std::unique_ptr<WindowTreeData>>::iterator FindWindowTreeData( |
| + aura::WindowTreeHostMus* window_tree_host); |
| aura::WindowTreeClient* window_tree_client() { |
| return window_tree_client_.get(); |