| 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> |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 | 62 |
| 63 // Updates the viewport metrics for the display, returning true if any | 63 // Updates the viewport metrics for the display, returning true if any |
| 64 // metrics have changed. | 64 // metrics have changed. |
| 65 virtual bool UpdateViewportMetrics( | 65 virtual bool UpdateViewportMetrics( |
| 66 const display::ViewportMetrics& metrics) = 0; | 66 const display::ViewportMetrics& metrics) = 0; |
| 67 | 67 |
| 68 virtual const display::ViewportMetrics& GetViewportMetrics() const = 0; | 68 virtual const display::ViewportMetrics& GetViewportMetrics() const = 0; |
| 69 | 69 |
| 70 virtual FrameGenerator* GetFrameGenerator() = 0; | 70 virtual FrameGenerator* GetFrameGenerator() = 0; |
| 71 | 71 |
| 72 // Notifies the PlatformDisplay that a connection to the gpu has been | |
| 73 // established. | |
| 74 virtual void OnGpuChannelEstablished( | |
| 75 scoped_refptr<gpu::GpuChannelHost> gpu_channel) = 0; | |
| 76 | |
| 77 // Overrides factory for testing. Default (NULL) value indicates regular | 72 // Overrides factory for testing. Default (NULL) value indicates regular |
| 78 // (non-test) environment. | 73 // (non-test) environment. |
| 79 static void set_factory_for_testing(PlatformDisplayFactory* factory) { | 74 static void set_factory_for_testing(PlatformDisplayFactory* factory) { |
| 80 PlatformDisplay::factory_ = factory; | 75 PlatformDisplay::factory_ = factory; |
| 81 } | 76 } |
| 82 | 77 |
| 83 private: | 78 private: |
| 84 // Static factory instance (always NULL for non-test). | 79 // Static factory instance (always NULL for non-test). |
| 85 static PlatformDisplayFactory* factory_; | 80 static PlatformDisplayFactory* factory_; |
| 86 }; | 81 }; |
| 87 | 82 |
| 88 | 83 |
| 89 } // namespace ws | 84 } // namespace ws |
| 90 } // namespace ui | 85 } // namespace ui |
| 91 | 86 |
| 92 #endif // SERVICES_UI_WS_PLATFORM_DISPLAY_H_ | 87 #endif // SERVICES_UI_WS_PLATFORM_DISPLAY_H_ |
| OLD | NEW |