| 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 "services/ui/ws/server_window.h" | 16 #include "services/ui/ws/server_window.h" |
| 17 #include "ui/platform_window/platform_window_delegate.h" | 17 #include "ui/platform_window/platform_window_delegate.h" |
| 18 | 18 |
| 19 namespace ui { | 19 namespace ui { |
| 20 | 20 |
| 21 class EventSink; |
| 21 class ImageCursors; | 22 class ImageCursors; |
| 22 class LocatedEvent; | 23 class LocatedEvent; |
| 23 class PlatformWindow; | 24 class PlatformWindow; |
| 24 | 25 |
| 25 namespace ws { | 26 namespace ws { |
| 26 | 27 |
| 27 // PlatformDisplay implementation that connects to a PlatformWindow and | 28 // PlatformDisplay implementation that connects to a PlatformWindow and |
| 28 // FrameGenerator for Chrome OS. | 29 // FrameGenerator for Chrome OS. |
| 29 class PlatformDisplayDefault : public PlatformDisplay, | 30 class PlatformDisplayDefault : public PlatformDisplay, |
| 30 public ui::PlatformWindowDelegate, | 31 public ui::PlatformWindowDelegate, |
| 31 public FrameGeneratorDelegate { | 32 public FrameGeneratorDelegate { |
| 32 public: | 33 public: |
| 33 PlatformDisplayDefault(ServerWindow* root_window, | 34 PlatformDisplayDefault(ServerWindow* root_window, |
| 34 const display::ViewportMetrics& metrics); | 35 const display::ViewportMetrics& metrics); |
| 35 ~PlatformDisplayDefault() override; | 36 ~PlatformDisplayDefault() override; |
| 36 | 37 |
| 38 // EventSource:: |
| 39 EventSink* GetEventSink() override; |
| 40 |
| 37 // PlatformDisplay: | 41 // PlatformDisplay: |
| 38 void Init(PlatformDisplayDelegate* delegate) override; | 42 void Init(PlatformDisplayDelegate* delegate) override; |
| 39 void SetViewportSize(const gfx::Size& size) override; | 43 void SetViewportSize(const gfx::Size& size) override; |
| 40 void SetTitle(const base::string16& title) override; | 44 void SetTitle(const base::string16& title) override; |
| 41 void SetCapture() override; | 45 void SetCapture() override; |
| 42 void ReleaseCapture() override; | 46 void ReleaseCapture() override; |
| 43 void SetCursorById(mojom::Cursor cursor) override; | 47 void SetCursorById(mojom::Cursor cursor) override; |
| 44 void UpdateTextInputState(const ui::TextInputState& state) override; | 48 void UpdateTextInputState(const ui::TextInputState& state) override; |
| 45 void SetImeVisibility(bool visible) override; | 49 void SetImeVisibility(bool visible) override; |
| 46 bool UpdateViewportMetrics(const display::ViewportMetrics& metrics) override; | 50 bool UpdateViewportMetrics(const display::ViewportMetrics& metrics) override; |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 gfx::AcceleratedWidget widget_; | 89 gfx::AcceleratedWidget widget_; |
| 86 float init_device_scale_factor_; | 90 float init_device_scale_factor_; |
| 87 | 91 |
| 88 DISALLOW_COPY_AND_ASSIGN(PlatformDisplayDefault); | 92 DISALLOW_COPY_AND_ASSIGN(PlatformDisplayDefault); |
| 89 }; | 93 }; |
| 90 | 94 |
| 91 } // namespace ws | 95 } // namespace ws |
| 92 } // namespace ui | 96 } // namespace ui |
| 93 | 97 |
| 94 #endif // SERVICES_UI_WS_PLATFORM_DISPLAY_DEFAULT_H_ | 98 #endif // SERVICES_UI_WS_PLATFORM_DISPLAY_DEFAULT_H_ |
| OLD | NEW |