Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(115)

Side by Side Diff: services/ui/ws/platform_display.h

Issue 2489003002: Convert mustash use surface references. (Closed)
Patch Set: Fixes for fsamuel. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 10 matching lines...) Expand all
21 namespace gpu { 21 namespace gpu {
22 class GpuChannelHost; 22 class GpuChannelHost;
23 } 23 }
24 24
25 namespace ui { 25 namespace ui {
26 26
27 struct TextInputState; 27 struct TextInputState;
28 28
29 namespace ws { 29 namespace ws {
30 30
31 class FrameGenerator;
31 class PlatformDisplayDelegate; 32 class PlatformDisplayDelegate;
32 class PlatformDisplayFactory; 33 class PlatformDisplayFactory;
33 struct PlatformDisplayInitParams; 34 struct PlatformDisplayInitParams;
34 35
35 // PlatformDisplay is used to connect the root ServerWindow to a display. 36 // PlatformDisplay is used to connect the root ServerWindow to a display.
36 class PlatformDisplay { 37 class PlatformDisplay {
37 public: 38 public:
38 virtual ~PlatformDisplay() {} 39 virtual ~PlatformDisplay() {}
39 40
40 static std::unique_ptr<PlatformDisplay> Create( 41 static std::unique_ptr<PlatformDisplay> Create(
(...skipping 20 matching lines...) Expand all
61 62
62 // Updates the viewport metrics for the display, returning true if any 63 // Updates the viewport metrics for the display, returning true if any
63 // metrics have changed. 64 // metrics have changed.
64 virtual bool UpdateViewportMetrics( 65 virtual bool UpdateViewportMetrics(
65 const display::ViewportMetrics& metrics) = 0; 66 const display::ViewportMetrics& metrics) = 0;
66 67
67 virtual const display::ViewportMetrics& GetViewportMetrics() const = 0; 68 virtual const display::ViewportMetrics& GetViewportMetrics() const = 0;
68 69
69 virtual bool IsPrimaryDisplay() const = 0; 70 virtual bool IsPrimaryDisplay() const = 0;
70 71
72 virtual FrameGenerator* GetFrameGenerator() = 0;
73
71 // Notifies the PlatformDisplay that a connection to the gpu has been 74 // Notifies the PlatformDisplay that a connection to the gpu has been
72 // established. 75 // established.
73 virtual void OnGpuChannelEstablished( 76 virtual void OnGpuChannelEstablished(
74 scoped_refptr<gpu::GpuChannelHost> gpu_channel) = 0; 77 scoped_refptr<gpu::GpuChannelHost> gpu_channel) = 0;
75 78
76 // Overrides factory for testing. Default (NULL) value indicates regular 79 // Overrides factory for testing. Default (NULL) value indicates regular
77 // (non-test) environment. 80 // (non-test) environment.
78 static void set_factory_for_testing(PlatformDisplayFactory* factory) { 81 static void set_factory_for_testing(PlatformDisplayFactory* factory) {
79 PlatformDisplay::factory_ = factory; 82 PlatformDisplay::factory_ = factory;
80 } 83 }
81 84
82 private: 85 private:
83 // Static factory instance (always NULL for non-test). 86 // Static factory instance (always NULL for non-test).
84 static PlatformDisplayFactory* factory_; 87 static PlatformDisplayFactory* factory_;
85 }; 88 };
86 89
87 90
88 } // namespace ws 91 } // namespace ws
89 } // namespace ui 92 } // namespace ui
90 93
91 #endif // SERVICES_UI_WS_PLATFORM_DISPLAY_H_ 94 #endif // SERVICES_UI_WS_PLATFORM_DISPLAY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698