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