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_WS_SERVER_WINDOW_DELEGATE_H_ | 5 #ifndef SERVICES_UI_WS_SERVER_WINDOW_DELEGATE_H_ |
6 #define SERVICES_UI_WS_SERVER_WINDOW_DELEGATE_H_ | 6 #define SERVICES_UI_WS_SERVER_WINDOW_DELEGATE_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "cc/ipc/display_compositor.mojom.h" | 10 #include "cc/ipc/display_compositor.mojom.h" |
11 #include "services/ui/public/interfaces/mus_constants.mojom.h" | 11 #include "services/ui/public/interfaces/mus_constants.mojom.h" |
12 #include "services/ui/public/interfaces/window_tree.mojom.h" | 12 #include "services/ui/public/interfaces/window_tree.mojom.h" |
13 | 13 |
14 namespace ui { | 14 namespace ui { |
15 | 15 |
16 namespace ws { | 16 namespace ws { |
17 | 17 |
18 class ServerWindow; | 18 class ServerWindow; |
19 | 19 |
20 class ServerWindowDelegate { | 20 class ServerWindowDelegate { |
21 public: | 21 public: |
22 // Returns a display compositor interface pointer. There is only one | 22 // Returns a display compositor interface pointer. There is only one |
23 // DisplayCompositor running in the system. | 23 // DisplayCompositor running in the system. |
24 virtual cc::mojom::DisplayCompositor* GetDisplayCompositor() = 0; | 24 virtual cc::mojom::DisplayCompositor* GetDisplayCompositor() = 0; |
25 | 25 |
26 // Returns the AssociatedGroup of DisplayCompositor which is used for | |
27 // creating interfaces that share the same MessagePipe with DisplayCompositor. | |
28 // Messages from interfaces that use the same AssociatedGroup will be | |
29 // delivered in the same order they were sent. | |
30 virtual mojo::AssociatedGroup* GetDisplayCompositorAssociatedGroup() = 0; | |
31 | |
32 // Returns the root of the window tree to which this |window| is attached. | 26 // Returns the root of the window tree to which this |window| is attached. |
33 // Returns null if this window is not attached up through to a root window. | 27 // Returns null if this window is not attached up through to a root window. |
34 virtual ServerWindow* GetRootWindow(const ServerWindow* window) = 0; | 28 virtual ServerWindow* GetRootWindow(const ServerWindow* window) = 0; |
35 | 29 |
36 protected: | 30 protected: |
37 virtual ~ServerWindowDelegate() {} | 31 virtual ~ServerWindowDelegate() {} |
38 }; | 32 }; |
39 | 33 |
40 } // namespace ws | 34 } // namespace ws |
41 | 35 |
42 } // namespace ui | 36 } // namespace ui |
43 | 37 |
44 #endif // SERVICES_UI_WS_SERVER_WINDOW_DELEGATE_H_ | 38 #endif // SERVICES_UI_WS_SERVER_WINDOW_DELEGATE_H_ |
OLD | NEW |