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 WindowTreeClient; | 23 class WindowTreeClient; |
24 class WindowTreeHostMus; | 24 class WindowTreeHostMus; |
25 | 25 |
26 namespace client { | 26 namespace client { |
27 class CaptureClient; | 27 class CaptureClient; |
28 class FocusClient; | |
29 } | 28 } |
30 | 29 |
31 // Interface implemented by an application using mus. | 30 // Interface implemented by an application using mus. |
32 class AURA_EXPORT WindowTreeClientDelegate { | 31 class AURA_EXPORT WindowTreeClientDelegate { |
33 public: | 32 public: |
34 // Called when the application implementing this interface is embedded. | 33 // Called when the application implementing this interface is embedded. |
35 // NOTE: this is only invoked if the WindowTreeClient is created with an | 34 // NOTE: this is only invoked if the WindowTreeClient is created with an |
36 // InterfaceRequest. | 35 // InterfaceRequest. |
37 virtual void OnEmbed(std::unique_ptr<WindowTreeHostMus> window_tree_host) = 0; | 36 virtual void OnEmbed(std::unique_ptr<WindowTreeHostMus> window_tree_host) = 0; |
38 | 37 |
(...skipping 14 matching lines...) Expand all Loading... |
53 // have no real effect. Generally when this is called clients should delete | 52 // have no real effect. Generally when this is called clients should delete |
54 // the corresponding WindowTreeClient. | 53 // the corresponding WindowTreeClient. |
55 virtual void OnLostConnection(WindowTreeClient* client) = 0; | 54 virtual void OnLostConnection(WindowTreeClient* client) = 0; |
56 | 55 |
57 // Called when the WindowTreeClient receives an input event observed via | 56 // Called when the WindowTreeClient receives an input event observed via |
58 // StartPointerWatcher(). |target| may be null for events that were sent to | 57 // StartPointerWatcher(). |target| may be null for events that were sent to |
59 // windows owned by other processes. | 58 // windows owned by other processes. |
60 virtual void OnPointerEventObserved(const ui::PointerEvent& event, | 59 virtual void OnPointerEventObserved(const ui::PointerEvent& event, |
61 Window* target) = 0; | 60 Window* target) = 0; |
62 | 61 |
63 // Mus expects a single FocusClient is used for all WindowTreeHosts. This | |
64 // returns it. GetFocusClient() is called from the constructor. | |
65 virtual client::FocusClient* GetFocusClient() = 0; | |
66 | |
67 // Mus expects a single CaptureClient is used for all WindowTreeHosts. This | 62 // Mus expects a single CaptureClient is used for all WindowTreeHosts. This |
68 // returns it. GetCaptureClient() is called from the constructor. | 63 // returns it. GetCaptureClient() is called from the constructor. |
69 virtual client::CaptureClient* GetCaptureClient() = 0; | 64 virtual client::CaptureClient* GetCaptureClient() = 0; |
70 | 65 |
71 virtual PropertyConverter* GetPropertyConverter() = 0; | 66 virtual PropertyConverter* GetPropertyConverter() = 0; |
72 | 67 |
73 protected: | 68 protected: |
74 virtual ~WindowTreeClientDelegate() {} | 69 virtual ~WindowTreeClientDelegate() {} |
75 }; | 70 }; |
76 | 71 |
77 } // namespace aura | 72 } // namespace aura |
78 | 73 |
79 #endif // UI_AURA_MUS_WINDOW_TREE_CLIENT_DELEGATE_H_ | 74 #endif // UI_AURA_MUS_WINDOW_TREE_CLIENT_DELEGATE_H_ |
OLD | NEW |