| 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::Size size_in_pixels; | 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 display. | 22 // Returns the root window of the display. |
| 23 virtual ServerWindow* GetRootWindow() = 0; | 23 virtual ServerWindow* GetRootWindow() = 0; |
| 24 | 24 |
| 25 // Called when a compositor frame is finished drawing. | 25 // Called when a compositor frame is finished drawing. |
| 26 virtual void OnCompositorFrameDrawn() = 0; | 26 virtual void OnCompositorFrameDrawn() = 0; |
| 27 | 27 |
| 28 virtual bool IsInHighContrastMode() = 0; | 28 virtual bool IsInHighContrastMode() = 0; |
| 29 | 29 |
| 30 virtual const ViewportMetrics& GetViewportMetrics() = 0; | 30 virtual const ViewportMetrics& GetViewportMetrics() = 0; |
| 31 | 31 |
| 32 protected: | 32 protected: |
| 33 virtual ~FrameGeneratorDelegate() {} | 33 virtual ~FrameGeneratorDelegate() {} |
| 34 }; | 34 }; |
| 35 | 35 |
| 36 } // namespace ws | 36 } // namespace ws |
| 37 } // namespace ui | 37 } // namespace ui |
| 38 | 38 |
| 39 #endif // SERVICES_UI_WS_FRAME_GENERATOR_DELEGATE_H_ | 39 #endif // SERVICES_UI_WS_FRAME_GENERATOR_DELEGATE_H_ |
| OLD | NEW |