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 #include "services/ui/ws/platform_display.h" | 5 #include "services/ui/ws/platform_display.h" |
6 | 6 |
7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
8 #include "services/ui/ws/platform_display_default.h" | 8 #include "services/ui/ws/platform_display_default.h" |
9 #include "services/ui/ws/platform_display_factory.h" | 9 #include "services/ui/ws/platform_display_factory.h" |
10 #include "services/ui/ws/platform_display_init_params.h" | 10 #include "services/ui/ws/server_window.h" |
11 | 11 |
12 namespace ui { | 12 namespace ui { |
13 namespace ws { | 13 namespace ws { |
14 | 14 |
15 // static | 15 // static |
16 PlatformDisplayFactory* PlatformDisplay::factory_ = nullptr; | 16 PlatformDisplayFactory* PlatformDisplay::factory_ = nullptr; |
17 | 17 |
18 // static | 18 // static |
19 std::unique_ptr<PlatformDisplay> PlatformDisplay::Create( | 19 std::unique_ptr<PlatformDisplay> PlatformDisplay::Create( |
20 const PlatformDisplayInitParams& init_params) { | 20 ServerWindow* root, |
| 21 const display::ViewportMetrics& metrics) { |
21 if (factory_) | 22 if (factory_) |
22 return factory_->CreatePlatformDisplay(init_params); | 23 return factory_->CreatePlatformDisplay(root, metrics); |
23 | 24 |
24 return base::MakeUnique<PlatformDisplayDefault>(init_params); | 25 return base::MakeUnique<PlatformDisplayDefault>(root, metrics); |
25 } | 26 } |
26 | 27 |
27 } // namespace ws | 28 } // namespace ws |
28 } // namespace ui | 29 } // namespace ui |
OLD | NEW |