Chromium Code Reviews| Index: services/ui/public/cpp/window_tree_client.h |
| diff --git a/services/ui/public/cpp/window_tree_client.h b/services/ui/public/cpp/window_tree_client.h |
| index 9e9959d8534d025db5613f707463091e4c5800c7..77194fe49013ed5f73e32834ed3f0c6c6f7bff8d 100644 |
| --- a/services/ui/public/cpp/window_tree_client.h |
| +++ b/services/ui/public/cpp/window_tree_client.h |
| @@ -46,18 +46,12 @@ enum class ChangeType; |
| // Manages the connection with mus. |
| // |
| -// WindowTreeClient is deleted by any of the following: |
| -// . If all the roots of the connection are destroyed and the connection is |
| -// configured to delete when there are no roots (true if the WindowTreeClient |
| -// is created with a mojom::WindowTreeClientRequest). This happens |
| -// if the owner of the roots Embed()s another app in all the roots, or all |
| -// the roots are explicitly deleted. |
| -// . The connection to mus is lost. |
| -// . Explicitly by way of calling delete. |
| +// WindowTreeClient is owned by the creator. Generally when the delegate gets |
| +// one of OnEmbedRootDestroyed() or OnLostConnection() it should delete the |
| +// WindowTreeClient. |
| // |
| // When WindowTreeClient is deleted all windows are deleted (and observers |
| -// notified). This is followed by calling |
| -// WindowTreeClientDelegate::OnDidDestroyClient(). |
| +// notified). |
| class WindowTreeClient : public mojom::WindowTreeClient, |
| public mojom::WindowManager, |
| public WindowManagerClient { |
| @@ -156,10 +150,6 @@ class WindowTreeClient : public mojom::WindowTreeClient, |
| Window* GetWindowByServerId(Id id); |
| - // Sets whether this is deleted when there are no roots. The default is to |
| - // delete when there are no roots. |
| - void SetDeleteOnNoRoots(bool value); |
| - |
| // Returns the root of this connection. |
| const std::set<Window*>& GetRoots(); |
| @@ -402,7 +392,8 @@ class WindowTreeClient : public mojom::WindowTreeClient, |
| // directly set this. |
| mojom::WindowTree* tree_; |
| - bool delete_on_no_roots_; |
| + // Set to true if OnEmbed() was received. |
| + bool is_from_embed_ = false; |
| bool in_destructor_; |
|
sadrul
2016/09/02 17:04:15
Sidenote: should we switch to default initializing
sky
2016/09/06 17:15:42
Yes, but I'll keep that to a separate patch.
|