Chromium Code Reviews| Index: services/ui/ws/display.cc |
| diff --git a/services/ui/ws/display.cc b/services/ui/ws/display.cc |
| index f375d07c3bba7ecb12b50070168378bfe04cdcc7..c7ea2081e4cc1eea81e2e52746f8269304f4d02c 100644 |
| --- a/services/ui/ws/display.cc |
| +++ b/services/ui/ws/display.cc |
| @@ -33,8 +33,7 @@ namespace ws { |
| Display::Display(WindowServer* window_server, |
| const PlatformDisplayInitParams& platform_display_init_params) |
| - : id_(window_server->display_manager()->GetAndAdvanceNextDisplayId()), |
| - window_server_(window_server), |
| + : window_server_(window_server), |
| platform_display_(PlatformDisplay::Create(platform_display_init_params)), |
| last_cursor_(ui::kCursorNone) { |
| platform_display_->Init(this); |
| @@ -73,6 +72,10 @@ void Display::Init(std::unique_ptr<DisplayBinding> binding) { |
| InitWindowManagerDisplayRootsIfNecessary(); |
| } |
| +int64_t Display::GetId() const { |
|
msw
2016/07/28 19:01:02
optional nit: this seems like it'd be okay as a si
kylechar
2016/07/28 19:20:16
I'll probably leave it like this, it better convey
|
| + return platform_display_->id(); |
| +} |
| + |
| DisplayManager* Display::display_manager() { |
| return window_server_->display_manager(); |
| } |
| @@ -94,7 +97,7 @@ mojom::WsDisplayPtr Display::ToWsDisplay() const { |
| } |
| ::display::Display Display::ToDisplay() const { |
| - ::display::Display display(id_); |
| + ::display::Display display(GetId()); |
| // TODO(sky): Display should know its origin. |
| display.set_bounds(gfx::Rect(0, 0, root_->bounds().size().width(), |
| @@ -134,10 +137,6 @@ gfx::Size Display::GetSize() const { |
| return root_->bounds().size(); |
| } |
| -int64_t Display::GetPlatformDisplayId() const { |
| - return platform_display_->GetDisplayId(); |
| -} |
| - |
| ServerWindow* Display::GetRootWithId(const WindowId& id) { |
| if (id == root_->id()) |
| return root_.get(); |