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 "services/ui/public/interfaces/mus_constants.mojom.h" | 10 #include "services/ui/public/interfaces/mus_constants.mojom.h" |
11 #include "services/ui/public/interfaces/window_tree.mojom.h" | 11 #include "services/ui/public/interfaces/window_tree.mojom.h" |
12 | 12 |
13 namespace ui { | 13 namespace ui { |
14 | 14 |
15 class SurfacesState; | 15 namespace surfaces { |
| 16 class DisplayCompositor; |
| 17 } |
16 | 18 |
17 namespace ws { | 19 namespace ws { |
18 | 20 |
19 struct ClientWindowId; | 21 struct ClientWindowId; |
20 class ServerWindow; | 22 class ServerWindow; |
21 struct WindowId; | 23 struct WindowId; |
22 | 24 |
23 class ServerWindowDelegate { | 25 class ServerWindowDelegate { |
24 public: | 26 public: |
25 virtual SurfacesState* GetSurfacesState() = 0; | 27 virtual surfaces::DisplayCompositor* GetDisplayCompositor() = 0; |
26 | 28 |
27 virtual void OnScheduleWindowPaint(ServerWindow* window) = 0; | 29 virtual void OnScheduleWindowPaint(ServerWindow* window) = 0; |
28 | 30 |
29 // Returns the root of the window tree to which this |window| is attached. | 31 // Returns the root of the window tree to which this |window| is attached. |
30 // Returns null if this window is not attached up through to a root window. | 32 // Returns null if this window is not attached up through to a root window. |
31 virtual const ServerWindow* GetRootWindow( | 33 virtual const ServerWindow* GetRootWindow( |
32 const ServerWindow* window) const = 0; | 34 const ServerWindow* window) const = 0; |
33 | 35 |
34 // Schedules a callback to DestroySurfacesScheduledForDestruction() at the | 36 // Schedules a callback to DestroySurfacesScheduledForDestruction() at the |
35 // appropriate time, which may be synchronously. | 37 // appropriate time, which may be synchronously. |
36 virtual void ScheduleSurfaceDestruction(ServerWindow* window) = 0; | 38 virtual void ScheduleSurfaceDestruction(ServerWindow* window) = 0; |
37 | 39 |
38 protected: | 40 protected: |
39 virtual ~ServerWindowDelegate() {} | 41 virtual ~ServerWindowDelegate() {} |
40 }; | 42 }; |
41 | 43 |
42 } // namespace ws | 44 } // namespace ws |
43 | 45 |
44 } // namespace ui | 46 } // namespace ui |
45 | 47 |
46 #endif // SERVICES_UI_WS_SERVER_WINDOW_DELEGATE_H_ | 48 #endif // SERVICES_UI_WS_SERVER_WINDOW_DELEGATE_H_ |
OLD | NEW |