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 SERVICES_UI_PUBLIC_CPP_WINDOW_TREE_CLIENT_DELEGATE_H_ | 5 #ifndef UI_AURA_MUS_WINDOW_TREE_CLIENT_DELEGATE_H_ |
6 #define SERVICES_UI_PUBLIC_CPP_WINDOW_TREE_CLIENT_DELEGATE_H_ | 6 #define UI_AURA_MUS_WINDOW_TREE_CLIENT_DELEGATE_H_ |
7 | 7 |
| 8 #include <memory> |
8 #include <string> | 9 #include <string> |
9 | 10 |
10 #include "services/service_manager/public/interfaces/interface_provider.mojom.h" | 11 #include "services/service_manager/public/interfaces/interface_provider.mojom.h" |
11 #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" |
12 | 14 |
13 namespace ui { | 15 namespace ui { |
14 class Event; | 16 class Event; |
15 } | 17 } |
16 | 18 |
17 namespace ui { | 19 namespace aura { |
18 | 20 |
| 21 class PropertyConverter; |
19 class Window; | 22 class Window; |
| 23 class WindowPortMus; |
20 class WindowTreeClient; | 24 class WindowTreeClient; |
21 | 25 |
| 26 namespace client { |
| 27 class CaptureClient; |
| 28 class FocusClient; |
| 29 } |
| 30 |
22 // Interface implemented by an application using mus. | 31 // Interface implemented by an application using mus. |
23 class WindowTreeClientDelegate { | 32 class AURA_EXPORT WindowTreeClientDelegate { |
24 public: | 33 public: |
25 // Called when the application implementing this interface is embedded at | 34 // Called when the application implementing this interface is embedded at |
26 // |root|. | 35 // |root|. |
27 // NOTE: this is only invoked if the WindowTreeClient is created with an | 36 // NOTE: this is only invoked if the WindowTreeClient is created with an |
28 // InterfaceRequest. | 37 // InterfaceRequest. |
29 virtual void OnEmbed(Window* root) = 0; | 38 virtual void OnEmbed(Window* root) = 0; |
30 | 39 |
31 // Sent when another app is embedded in |root| (one of the roots of the | 40 // Sent when another app is embedded in |root| (one of the roots of the |
32 // connection). Afer this call |root| is deleted. If the associated | 41 // connection). Afer this call |root| is deleted. If the associated |
33 // WindowTreeClient was created from a WindowTreeClientRequest then | 42 // WindowTreeClient was created from a WindowTreeClientRequest then |
(...skipping 11 matching lines...) Expand all Loading... |
45 // have no real effect. Generally when this is called clients should delete | 54 // have no real effect. Generally when this is called clients should delete |
46 // the corresponding WindowTreeClient. | 55 // the corresponding WindowTreeClient. |
47 virtual void OnLostConnection(WindowTreeClient* client) = 0; | 56 virtual void OnLostConnection(WindowTreeClient* client) = 0; |
48 | 57 |
49 // Called when the WindowTreeClient receives an input event observed via | 58 // Called when the WindowTreeClient receives an input event observed via |
50 // StartPointerWatcher(). |target| may be null for events that were sent to | 59 // StartPointerWatcher(). |target| may be null for events that were sent to |
51 // windows owned by other processes. | 60 // windows owned by other processes. |
52 virtual void OnPointerEventObserved(const ui::PointerEvent& event, | 61 virtual void OnPointerEventObserved(const ui::PointerEvent& event, |
53 Window* target) = 0; | 62 Window* target) = 0; |
54 | 63 |
| 64 // Mus expects a single FocusClient is used for all WindowTreeHosts. This |
| 65 // returns it. GetFocusClient() is called from the constructor. |
| 66 virtual client::FocusClient* GetFocusClient() = 0; |
| 67 |
| 68 // Mus expects a single CaptureClient is used for all WindowTreeHosts. This |
| 69 // returns it. GetCaptureClient() is called from the constructor. |
| 70 virtual client::CaptureClient* GetCaptureClient() = 0; |
| 71 |
| 72 virtual PropertyConverter* GetPropertyConverter() = 0; |
| 73 |
55 protected: | 74 protected: |
56 virtual ~WindowTreeClientDelegate() {} | 75 virtual ~WindowTreeClientDelegate() {} |
57 }; | 76 }; |
58 | 77 |
59 } // namespace ui | 78 } // namespace aura |
60 | 79 |
61 #endif // SERVICES_UI_PUBLIC_CPP_WINDOW_TREE_CLIENT_DELEGATE_H_ | 80 #endif // UI_AURA_MUS_WINDOW_TREE_CLIENT_DELEGATE_H_ |
OLD | NEW |