| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef UI_AURA_MUS_WINDOW_TREE_CLIENT_DELEGATE_H_ | 5 #ifndef UI_AURA_MUS_WINDOW_TREE_CLIENT_DELEGATE_H_ |
| 6 #define UI_AURA_MUS_WINDOW_TREE_CLIENT_DELEGATE_H_ | 6 #define UI_AURA_MUS_WINDOW_TREE_CLIENT_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "services/service_manager/public/interfaces/interface_provider.mojom.h" | 11 #include "services/service_manager/public/interfaces/interface_provider.mojom.h" |
| 12 #include "services/ui/public/interfaces/window_tree.mojom.h" | 12 #include "services/ui/public/interfaces/window_tree.mojom.h" |
| 13 #include "ui/aura/aura_export.h" | 13 #include "ui/aura/aura_export.h" |
| 14 | 14 |
| 15 namespace ui { | 15 namespace ui { |
| 16 class Event; | 16 class Event; |
| 17 } | 17 } |
| 18 | 18 |
| 19 namespace aura { | 19 namespace aura { |
| 20 | 20 |
| 21 class PropertyConverter; | 21 class PropertyConverter; |
| 22 class Window; | 22 class Window; |
| 23 class WindowPortMus; | |
| 24 class WindowTreeClient; | 23 class WindowTreeClient; |
| 24 class WindowTreeHostMus; |
| 25 | 25 |
| 26 namespace client { | 26 namespace client { |
| 27 class CaptureClient; | 27 class CaptureClient; |
| 28 class FocusClient; | 28 class FocusClient; |
| 29 } | 29 } |
| 30 | 30 |
| 31 // Interface implemented by an application using mus. | 31 // Interface implemented by an application using mus. |
| 32 class AURA_EXPORT WindowTreeClientDelegate { | 32 class AURA_EXPORT WindowTreeClientDelegate { |
| 33 public: | 33 public: |
| 34 // Called when the application implementing this interface is embedded at | 34 // Called when the application implementing this interface is embedded. |
| 35 // |root|. | |
| 36 // NOTE: this is only invoked if the WindowTreeClient is created with an | 35 // NOTE: this is only invoked if the WindowTreeClient is created with an |
| 37 // InterfaceRequest. | 36 // InterfaceRequest. |
| 38 virtual void OnEmbed(Window* root) = 0; | 37 virtual void OnEmbed(std::unique_ptr<WindowTreeHostMus> window_tree_host) = 0; |
| 39 | 38 |
| 40 // Sent when another app is embedded in |root| (one of the roots of the | 39 // Sent when another app is embedded in |root| (one of the roots of the |
| 41 // connection). Afer this call |root| is deleted. If the associated | 40 // connection). Afer this call |root| is deleted. If the associated |
| 42 // WindowTreeClient was created from a WindowTreeClientRequest then | 41 // WindowTreeClient was created from a WindowTreeClientRequest then |
| 43 // OnEmbedRootDestroyed() is called after the window is deleted. | 42 // OnEmbedRootDestroyed() is called after the window is deleted. |
| 44 virtual void OnUnembed(Window* root); | 43 virtual void OnUnembed(Window* root); |
| 45 | 44 |
| 46 // Called when the embed root has been destroyed on the server side (or | 45 // Called when the embed root has been destroyed on the server side (or |
| 47 // another client was embedded in the same window). This is only called if the | 46 // another client was embedded in the same window). This is only called if the |
| 48 // WindowTreeClient was created from an InterfaceRequest. Generally when this | 47 // WindowTreeClient was created from an InterfaceRequest. Generally when this |
| (...skipping 22 matching lines...) Expand all Loading... |
| 71 | 70 |
| 72 virtual PropertyConverter* GetPropertyConverter() = 0; | 71 virtual PropertyConverter* GetPropertyConverter() = 0; |
| 73 | 72 |
| 74 protected: | 73 protected: |
| 75 virtual ~WindowTreeClientDelegate() {} | 74 virtual ~WindowTreeClientDelegate() {} |
| 76 }; | 75 }; |
| 77 | 76 |
| 78 } // namespace aura | 77 } // namespace aura |
| 79 | 78 |
| 80 #endif // UI_AURA_MUS_WINDOW_TREE_CLIENT_DELEGATE_H_ | 79 #endif // UI_AURA_MUS_WINDOW_TREE_CLIENT_DELEGATE_H_ |
| OLD | NEW |