| 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_PLATFORM_DISPLAY_DEFAULT_H_ | 5 #ifndef SERVICES_UI_WS_PLATFORM_DISPLAY_DEFAULT_H_ |
| 6 #define SERVICES_UI_WS_PLATFORM_DISPLAY_DEFAULT_H_ | 6 #define SERVICES_UI_WS_PLATFORM_DISPLAY_DEFAULT_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "services/ui/display/viewport_metrics.h" | 11 #include "services/ui/display/viewport_metrics.h" |
| 12 #include "services/ui/ws/frame_generator.h" | 12 #include "services/ui/ws/frame_generator.h" |
| 13 #include "services/ui/ws/frame_generator_delegate.h" | 13 #include "services/ui/ws/frame_generator_delegate.h" |
| 14 #include "services/ui/ws/platform_display.h" | 14 #include "services/ui/ws/platform_display.h" |
| 15 #include "services/ui/ws/platform_display_delegate.h" | 15 #include "services/ui/ws/platform_display_delegate.h" |
| 16 #include "ui/platform_window/platform_window_delegate.h" | 16 #include "ui/platform_window/platform_window_delegate.h" |
| 17 | 17 |
| 18 namespace ui { | 18 namespace ui { |
| 19 | 19 |
| 20 class CursorLoader; | 20 class ImageCursors; |
| 21 class PlatformWindow; | 21 class PlatformWindow; |
| 22 | 22 |
| 23 namespace ws { | 23 namespace ws { |
| 24 | 24 |
| 25 // PlatformDisplay implementation that connects to a PlatformWindow and | 25 // PlatformDisplay implementation that connects to a PlatformWindow and |
| 26 // FrameGenerator for Chrome OS. | 26 // FrameGenerator for Chrome OS. |
| 27 class PlatformDisplayDefault : public PlatformDisplay, | 27 class PlatformDisplayDefault : public PlatformDisplay, |
| 28 public ui::PlatformWindowDelegate, | 28 public ui::PlatformWindowDelegate, |
| 29 private FrameGeneratorDelegate { | 29 private FrameGeneratorDelegate { |
| 30 public: | 30 public: |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 float device_scale_factor) override; | 66 float device_scale_factor) override; |
| 67 void OnAcceleratedWidgetDestroyed() override; | 67 void OnAcceleratedWidgetDestroyed() override; |
| 68 void OnActivationChanged(bool active) override; | 68 void OnActivationChanged(bool active) override; |
| 69 | 69 |
| 70 // FrameGeneratorDelegate: | 70 // FrameGeneratorDelegate: |
| 71 bool IsInHighContrastMode() override; | 71 bool IsInHighContrastMode() override; |
| 72 | 72 |
| 73 const int64_t display_id_; | 73 const int64_t display_id_; |
| 74 | 74 |
| 75 #if !defined(OS_ANDROID) | 75 #if !defined(OS_ANDROID) |
| 76 std::unique_ptr<ui::CursorLoader> cursor_loader_; | 76 std::unique_ptr<ui::ImageCursors> image_cursors_; |
| 77 #endif | 77 #endif |
| 78 | 78 |
| 79 PlatformDisplayDelegate* delegate_ = nullptr; | 79 PlatformDisplayDelegate* delegate_ = nullptr; |
| 80 std::unique_ptr<FrameGenerator> frame_generator_; | 80 std::unique_ptr<FrameGenerator> frame_generator_; |
| 81 | 81 |
| 82 display::ViewportMetrics metrics_; | 82 display::ViewportMetrics metrics_; |
| 83 std::unique_ptr<ui::PlatformWindow> platform_window_; | 83 std::unique_ptr<ui::PlatformWindow> platform_window_; |
| 84 | 84 |
| 85 DISALLOW_COPY_AND_ASSIGN(PlatformDisplayDefault); | 85 DISALLOW_COPY_AND_ASSIGN(PlatformDisplayDefault); |
| 86 }; | 86 }; |
| 87 | 87 |
| 88 } // namespace ws | 88 } // namespace ws |
| 89 } // namespace ui | 89 } // namespace ui |
| 90 | 90 |
| 91 #endif // SERVICES_UI_WS_PLATFORM_DISPLAY_DEFAULT_H_ | 91 #endif // SERVICES_UI_WS_PLATFORM_DISPLAY_DEFAULT_H_ |
| OLD | NEW |