| 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_PLATFORM_DISPLAY_H_ | 5 #ifndef SERVICES_UI_WS_PLATFORM_DISPLAY_H_ |
| 6 #define SERVICES_UI_WS_PLATFORM_DISPLAY_H_ | 6 #define SERVICES_UI_WS_PLATFORM_DISPLAY_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 | 11 |
| 12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 13 #include "base/strings/string16.h" | 13 #include "base/strings/string16.h" |
| 14 #include "services/ui/display/viewport_metrics.h" | 14 #include "services/ui/display/viewport_metrics.h" |
| 15 #include "services/ui/public/interfaces/cursor/cursor.mojom.h" | 15 #include "services/ui/public/interfaces/cursor/cursor.mojom.h" |
| 16 #include "ui/events/event_source.h" | 16 #include "ui/events/event_source.h" |
| 17 #include "ui/gfx/native_widget_types.h" | 17 #include "ui/gfx/native_widget_types.h" |
| 18 | 18 |
| 19 namespace base { | 19 namespace base { |
| 20 class SingleThreadTaskRunner; | 20 class SingleThreadTaskRunner; |
| 21 } | 21 } |
| 22 | 22 |
| 23 namespace ui { | 23 namespace ui { |
| 24 | 24 |
| 25 enum class CursorSize; | 25 enum class CursorSize; |
| 26 class ImageCursors; | 26 class ImageCursorsHolder; |
| 27 struct TextInputState; | 27 struct TextInputState; |
| 28 | 28 |
| 29 namespace ws { | 29 namespace ws { |
| 30 | 30 |
| 31 class FrameGenerator; | 31 class FrameGenerator; |
| 32 class PlatformDisplayDelegate; | 32 class PlatformDisplayDelegate; |
| 33 class PlatformDisplayFactory; | 33 class PlatformDisplayFactory; |
| 34 class ServerWindow; | 34 class ServerWindow; |
| 35 | 35 |
| 36 // PlatformDisplay is used to connect the root ServerWindow to a display. | 36 // PlatformDisplay is used to connect the root ServerWindow to a display. |
| 37 class PlatformDisplay : public ui::EventSource { | 37 class PlatformDisplay : public ui::EventSource { |
| 38 public: | 38 public: |
| 39 ~PlatformDisplay() override {} | 39 ~PlatformDisplay() override {} |
| 40 | 40 |
| 41 static std::unique_ptr<PlatformDisplay> Create( | 41 static std::unique_ptr<PlatformDisplay> Create( |
| 42 ServerWindow* root_window, | 42 ServerWindow* root_window, |
| 43 const display::ViewportMetrics& metrics, | 43 const display::ViewportMetrics& metrics, |
| 44 scoped_refptr<base::SingleThreadTaskRunner>& resource_runner, | 44 scoped_refptr<base::SingleThreadTaskRunner>& resource_runner, |
| 45 base::WeakPtr<ui::ImageCursors> image_cursors_weak_ptr); | 45 base::WeakPtr<ui::ImageCursorsHolder> image_cursors_holder_weak_ptr); |
| 46 | 46 |
| 47 virtual void Init(PlatformDisplayDelegate* delegate) = 0; | 47 virtual void Init(PlatformDisplayDelegate* delegate) = 0; |
| 48 | 48 |
| 49 virtual void SetViewportSize(const gfx::Size& size) = 0; | 49 virtual void SetViewportSize(const gfx::Size& size) = 0; |
| 50 | 50 |
| 51 virtual void SetTitle(const base::string16& title) = 0; | 51 virtual void SetTitle(const base::string16& title) = 0; |
| 52 | 52 |
| 53 virtual void SetCapture() = 0; | 53 virtual void SetCapture() = 0; |
| 54 | 54 |
| 55 virtual void ReleaseCapture() = 0; | 55 virtual void ReleaseCapture() = 0; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 82 private: | 82 private: |
| 83 // Static factory instance (always NULL for non-test). | 83 // Static factory instance (always NULL for non-test). |
| 84 static PlatformDisplayFactory* factory_; | 84 static PlatformDisplayFactory* factory_; |
| 85 }; | 85 }; |
| 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_H_ | 91 #endif // SERVICES_UI_WS_PLATFORM_DISPLAY_H_ |
| OLD | NEW |