| 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 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 // InterfaceRequest. | 31 // InterfaceRequest. |
| 32 virtual void OnEmbed(std::unique_ptr<WindowTreeHostMus> window_tree_host) = 0; | 32 virtual void OnEmbed(std::unique_ptr<WindowTreeHostMus> window_tree_host) = 0; |
| 33 | 33 |
| 34 // Sent when another app is embedded in |root| (one of the roots of the | 34 // Sent when another app is embedded in |root| (one of the roots of the |
| 35 // connection). Afer this call |root| is deleted. If the associated | 35 // connection). Afer this call |root| is deleted. If the associated |
| 36 // WindowTreeClient was created from a WindowTreeClientRequest then | 36 // WindowTreeClient was created from a WindowTreeClientRequest then |
| 37 // OnEmbedRootDestroyed() is called after the window is deleted. | 37 // OnEmbedRootDestroyed() is called after the window is deleted. |
| 38 virtual void OnUnembed(Window* root); | 38 virtual void OnUnembed(Window* root); |
| 39 | 39 |
| 40 // Called when the embed root has been destroyed on the server side (or | 40 // Called when the embed root has been destroyed on the server side (or |
| 41 // another client was embedded in the same window). This is only called if the | 41 // another client was embedded in the same window). This is called in two |
| 42 // WindowTreeClient was created from an InterfaceRequest. Generally when this | 42 // distinct cases: |
| 43 // is called the delegate should delete the WindowTreeClient. | 43 // . If the WindowTreeClient was created from an InterfaceRequest. In this |
| 44 virtual void OnEmbedRootDestroyed(Window* root) = 0; | 44 // case the WindowTreeClient associated with the WindowTreeHost is no |
| 45 // longer in a usable state and should be deleted (after deleting |
| 46 // |window_tree_host|). |
| 47 // . When the window associated with a top level window (one created by way of |
| 48 // directly creating a WindowTreeHostMus) is destroyed on the server side. |
| 49 // In this case the |window_tree_host| should be destroyed, but the |
| 50 // WindowTreeClient is still usable. |
| 51 virtual void OnEmbedRootDestroyed(WindowTreeHostMus* window_tree_host) = 0; |
| 45 | 52 |
| 46 // Called when the connection to the window server has been lost. After this | 53 // Called when the connection to the window server has been lost. After this |
| 47 // call the windows are still valid, and you can still do things, but they | 54 // call the windows are still valid, and you can still do things, but they |
| 48 // have no real effect. Generally when this is called clients should delete | 55 // have no real effect. Generally when this is called clients should delete |
| 49 // the corresponding WindowTreeClient. | 56 // the corresponding WindowTreeClient. |
| 50 virtual void OnLostConnection(WindowTreeClient* client) = 0; | 57 virtual void OnLostConnection(WindowTreeClient* client) = 0; |
| 51 | 58 |
| 52 // Called when the WindowTreeClient receives an input event observed via | 59 // Called when the WindowTreeClient receives an input event observed via |
| 53 // StartPointerWatcher(). |target| may be null for events that were sent to | 60 // StartPointerWatcher(). |target| may be null for events that were sent to |
| 54 // windows owned by other processes. | 61 // windows owned by other processes. |
| 55 virtual void OnPointerEventObserved(const ui::PointerEvent& event, | 62 virtual void OnPointerEventObserved(const ui::PointerEvent& event, |
| 56 Window* target) = 0; | 63 Window* target) = 0; |
| 57 | 64 |
| 58 // Mus expects a single CaptureClient is used for all WindowTreeHosts. This | 65 // Mus expects a single CaptureClient is used for all WindowTreeHosts. This |
| 59 // returns it. GetCaptureClient() is called from the constructor. | 66 // returns it. GetCaptureClient() is called from the constructor. |
| 60 virtual client::CaptureClient* GetCaptureClient() = 0; | 67 virtual client::CaptureClient* GetCaptureClient() = 0; |
| 61 | 68 |
| 62 virtual PropertyConverter* GetPropertyConverter() = 0; | 69 virtual PropertyConverter* GetPropertyConverter() = 0; |
| 63 | 70 |
| 64 protected: | 71 protected: |
| 65 virtual ~WindowTreeClientDelegate() {} | 72 virtual ~WindowTreeClientDelegate() {} |
| 66 }; | 73 }; |
| 67 | 74 |
| 68 } // namespace aura | 75 } // namespace aura |
| 69 | 76 |
| 70 #endif // UI_AURA_MUS_WINDOW_TREE_CLIENT_DELEGATE_H_ | 77 #endif // UI_AURA_MUS_WINDOW_TREE_CLIENT_DELEGATE_H_ |
| OLD | NEW |