Index: services/ui/demo/mus_demo.h |
diff --git a/services/ui/demo/mus_demo.h b/services/ui/demo/mus_demo.h |
index bf8c1276e41ffd945ea26ed68a14f154a6e0e4c9..5a1a32272036c9f34dba723dce36e9bcee00de14 100644 |
--- a/services/ui/demo/mus_demo.h |
+++ b/services/ui/demo/mus_demo.h |
@@ -44,14 +44,18 @@ class MusDemo : public service_manager::Service, |
protected: |
void AddPrimaryDisplay(const display::Display& display); |
+ void AppendWindowTreeData(std::unique_ptr<WindowTreeData> window_tree_data); |
kylechar
2017/02/23 22:45:30
Can you walk me through the flow of how this is su
fwang
2017/02/24 10:08:50
Sure. This is explained in a comment above window_
|
void InitWindowTreeData( |
std::unique_ptr<aura::WindowTreeHostMus> window_tree_host); |
- void CleanupWindowTreeData(); |
+ void RemoveWindowTreeDataFor(aura::WindowTreeHostMus* window_tree_host); |
kylechar
2017/02/23 22:45:30
nit: RemoveWindowTreeData maybe?
fwang
2017/02/24 10:08:50
Antonio suggested to change to RemoveWindowTreeDat
fwang
2017/02/24 10:40:10
Done.
|
+ aura::WindowTreeClient* window_tree_client() { |
+ return window_tree_client_.get(); |
+ } |
private: |
- virtual void OnStartImpl( |
- std::unique_ptr<aura::WindowTreeClient>* window_tree_client, |
- std::unique_ptr<WindowTreeData>* window_tree_data) = 0; |
+ virtual void OnStartImpl() = 0; |
+ virtual std::unique_ptr<aura::WindowTreeClient> CreateWindowTreeClient() = 0; |
+ bool HasPendingWindowTreeData() const; |
// service_manager::Service: |
void OnStart() override; |
@@ -76,7 +80,10 @@ class MusDemo : public service_manager::Service, |
std::unique_ptr<::wm::WMState> wm_state_; |
std::unique_ptr<aura::PropertyConverter> property_converter_; |
- std::unique_ptr<WindowTreeData> window_tree_data_; |
+ // List of WindowTreeData structures. When a new window is opened, its data |
+ // is appended at the end of that list and it remains uninitialized until the |
+ // next call to InitWindowTreeData. |
+ std::vector<std::unique_ptr<WindowTreeData>> window_tree_data_list_; |
DISALLOW_COPY_AND_ASSIGN(MusDemo); |
}; |