OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_FRAME_GENERATOR_DELEGATE_H_ | 5 #ifndef SERVICES_UI_WS_FRAME_GENERATOR_DELEGATE_H_ |
6 #define SERVICES_UI_WS_FRAME_GENERATOR_DELEGATE_H_ | 6 #define SERVICES_UI_WS_FRAME_GENERATOR_DELEGATE_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 | 9 |
10 namespace ui { | 10 namespace ui { |
11 namespace ws { | 11 namespace ws { |
12 | 12 |
13 class ServerWindow; | 13 class ServerWindow; |
14 | 14 |
15 struct ViewportMetrics { | 15 struct ViewportMetrics { |
16 gfx::Rect bounds; | 16 gfx::Rect bounds; |
17 float device_scale_factor = 0.f; | 17 float device_scale_factor = 0.f; |
18 }; | 18 }; |
19 | 19 |
20 class FrameGeneratorDelegate { | 20 class FrameGeneratorDelegate { |
21 public: | 21 public: |
| 22 // Returns the root window of the active user. |
| 23 virtual ServerWindow* GetActiveRootWindow() = 0; |
| 24 |
22 // Returns the root window of the display. | 25 // Returns the root window of the display. |
23 virtual ServerWindow* GetRootWindow() = 0; | 26 virtual ServerWindow* GetRootWindow() = 0; |
24 | 27 |
25 // Called when a compositor frame is finished drawing. | 28 // Called when a compositor frame is finished drawing. |
26 virtual void OnCompositorFrameDrawn() = 0; | 29 virtual void OnCompositorFrameDrawn() = 0; |
27 | 30 |
28 virtual bool IsInHighContrastMode() = 0; | 31 virtual bool IsInHighContrastMode() = 0; |
29 | 32 |
30 virtual const ViewportMetrics& GetViewportMetrics() = 0; | 33 virtual const ViewportMetrics& GetViewportMetrics() = 0; |
31 | 34 |
32 protected: | 35 protected: |
33 virtual ~FrameGeneratorDelegate() {} | 36 virtual ~FrameGeneratorDelegate() {} |
34 }; | 37 }; |
35 | 38 |
36 } // namespace ws | 39 } // namespace ws |
37 } // namespace ui | 40 } // namespace ui |
38 | 41 |
39 #endif // SERVICES_UI_WS_FRAME_GENERATOR_DELEGATE_H_ | 42 #endif // SERVICES_UI_WS_FRAME_GENERATOR_DELEGATE_H_ |
OLD | NEW |