Chromium Code Reviews| Index: services/ui/ws/display.h |
| diff --git a/services/ui/ws/display.h b/services/ui/ws/display.h |
| index 901a5b1e962d484ef52722b7aa8bdfc3e8c62691..02d27ca04b0d990976c7d16cd97f810fffde86a6 100644 |
| --- a/services/ui/ws/display.h |
| +++ b/services/ui/ws/display.h |
| @@ -58,12 +58,13 @@ class Display : public PlatformDisplayDelegate, |
| public UserIdTrackerObserver, |
| public WindowManagerWindowTreeFactorySetObserver { |
| public: |
| - Display(WindowServer* window_server, |
| - const PlatformDisplayInitParams& platform_display_init_params); |
| + explicit Display(WindowServer* window_server); |
| ~Display() override; |
| - // Initializes state that depends on the existence of a Display. |
| - void Init(std::unique_ptr<DisplayBinding> binding); |
| + // Initializes the display root ServerWindow and PlatformDisplay. Adds this to |
| + // DisplayManager as a pending display, until accelerated widget is available. |
| + void Init(const PlatformDisplayInitParams& init_params, |
| + std::unique_ptr<DisplayBinding> binding); |
| int64_t GetId() const; |
| @@ -75,7 +76,7 @@ class Display : public PlatformDisplayDelegate, |
| // Returns a display::Display corresponding to this ws::Display. |
| display::Display ToDisplay() const; |
| - gfx::Size GetSize() const; |
| + gfx::Size GetPixelSize() const; |
|
sky
2016/11/14 21:36:19
Isn't mus going to be entirely pixels? If so, it d
kylechar
2016/11/16 14:29:52
Changed the name back and added a comment. Will wr
|
| WindowServer* window_server() { return window_server_; } |
| @@ -147,7 +148,7 @@ class Display : public PlatformDisplayDelegate, |
| std::map<UserId, WindowManagerDisplayRoot*>; |
| // Inits the necessary state once the display is ready. |
| - void InitWindowManagerDisplayRootsIfNecessary(); |
| + void InitWindowManagerDisplayRoots(); |
| // Creates the set of WindowManagerDisplayRoots from the |
| // WindowManagerWindowTreeFactorySet. |
| @@ -162,6 +163,7 @@ class Display : public PlatformDisplayDelegate, |
| // PlatformDisplayDelegate: |
| ServerWindow* GetRootWindow() override; |
| + void OnAcceleratedWidgetAvailable() override; |
| bool IsInHighContrastMode() override; |
| void OnEvent(const ui::Event& event) override; |
| void OnNativeCaptureLost() override; |
| @@ -184,8 +186,6 @@ class Display : public PlatformDisplayDelegate, |
| WindowManagerWindowTreeFactory* factory) override; |
| std::unique_ptr<DisplayBinding> binding_; |
| - // Set once Init() has been called. |
| - bool init_called_ = false; |
| WindowServer* const window_server_; |
| std::unique_ptr<ServerWindow> root_; |
| std::unique_ptr<PlatformDisplay> platform_display_; |