| 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.mojom.h" | 15 #include "services/ui/public/interfaces/cursor.mojom.h" |
| 16 #include "ui/gfx/native_widget_types.h" |
| 16 | 17 |
| 17 namespace gfx { | 18 namespace gfx { |
| 18 class Rect; | 19 class Rect; |
| 19 } | 20 } |
| 20 | 21 |
| 21 namespace ui { | 22 namespace ui { |
| 22 | 23 |
| 23 struct TextInputState; | 24 struct TextInputState; |
| 24 | 25 |
| 25 namespace ws { | 26 namespace ws { |
| (...skipping 30 matching lines...) Expand all Loading... |
| 56 | 57 |
| 57 virtual gfx::Rect GetBounds() const = 0; | 58 virtual gfx::Rect GetBounds() const = 0; |
| 58 | 59 |
| 59 // Updates the viewport metrics for the display, returning true if any | 60 // Updates the viewport metrics for the display, returning true if any |
| 60 // metrics have changed. | 61 // metrics have changed. |
| 61 virtual bool UpdateViewportMetrics( | 62 virtual bool UpdateViewportMetrics( |
| 62 const display::ViewportMetrics& metrics) = 0; | 63 const display::ViewportMetrics& metrics) = 0; |
| 63 | 64 |
| 64 virtual const display::ViewportMetrics& GetViewportMetrics() const = 0; | 65 virtual const display::ViewportMetrics& GetViewportMetrics() const = 0; |
| 65 | 66 |
| 67 // Returns the AcceleratedWidget associated with the Display. It can return |
| 68 // kNullAcceleratedWidget if the accelerated widget is not available yet. |
| 69 virtual gfx::AcceleratedWidget GetAcceleratedWidget() const = 0; |
| 70 |
| 66 virtual FrameGenerator* GetFrameGenerator() = 0; | 71 virtual FrameGenerator* GetFrameGenerator() = 0; |
| 67 | 72 |
| 68 // Overrides factory for testing. Default (NULL) value indicates regular | 73 // Overrides factory for testing. Default (NULL) value indicates regular |
| 69 // (non-test) environment. | 74 // (non-test) environment. |
| 70 static void set_factory_for_testing(PlatformDisplayFactory* factory) { | 75 static void set_factory_for_testing(PlatformDisplayFactory* factory) { |
| 71 PlatformDisplay::factory_ = factory; | 76 PlatformDisplay::factory_ = factory; |
| 72 } | 77 } |
| 73 | 78 |
| 74 private: | 79 private: |
| 75 // Static factory instance (always NULL for non-test). | 80 // Static factory instance (always NULL for non-test). |
| 76 static PlatformDisplayFactory* factory_; | 81 static PlatformDisplayFactory* factory_; |
| 77 }; | 82 }; |
| 78 | 83 |
| 79 | 84 |
| 80 } // namespace ws | 85 } // namespace ws |
| 81 } // namespace ui | 86 } // namespace ui |
| 82 | 87 |
| 83 #endif // SERVICES_UI_WS_PLATFORM_DISPLAY_H_ | 88 #endif // SERVICES_UI_WS_PLATFORM_DISPLAY_H_ |
| OLD | NEW |