| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/display.h" | 5 #include "services/ui/ws/display.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 #include "services/ui/ws/window_tree.h" | 28 #include "services/ui/ws/window_tree.h" |
| 29 #include "services/ui/ws/window_tree_binding.h" | 29 #include "services/ui/ws/window_tree_binding.h" |
| 30 #include "ui/base/cursor/cursor.h" | 30 #include "ui/base/cursor/cursor.h" |
| 31 | 31 |
| 32 namespace ui { | 32 namespace ui { |
| 33 namespace ws { | 33 namespace ws { |
| 34 | 34 |
| 35 Display::Display(WindowServer* window_server, | 35 Display::Display(WindowServer* window_server, |
| 36 const PlatformDisplayInitParams& platform_display_init_params) | 36 const PlatformDisplayInitParams& platform_display_init_params) |
| 37 : window_server_(window_server), last_cursor_(mojom::Cursor::CURSOR_NULL) { | 37 : window_server_(window_server), last_cursor_(mojom::Cursor::CURSOR_NULL) { |
| 38 CreateRootWindow(platform_display_init_params.metrics.bounds.size()); | 38 CreateRootWindow(platform_display_init_params.metrics.pixel_size); |
| 39 | 39 |
| 40 // Pass the display root ServerWindow to PlatformDisplay. | 40 // Pass the display root ServerWindow to PlatformDisplay. |
| 41 PlatformDisplayInitParams param_copy = platform_display_init_params; | 41 PlatformDisplayInitParams param_copy = platform_display_init_params; |
| 42 param_copy.root_window = root_.get(); | 42 param_copy.root_window = root_.get(); |
| 43 platform_display_.reset(PlatformDisplay::Create(param_copy)); | 43 platform_display_.reset(PlatformDisplay::Create(param_copy)); |
| 44 platform_display_->Init(this); | 44 platform_display_->Init(this); |
| 45 | 45 |
| 46 window_server_->window_manager_window_tree_factory_set()->AddObserver(this); | 46 window_server_->window_manager_window_tree_factory_set()->AddObserver(this); |
| 47 window_server_->user_id_tracker()->AddObserver(this); | 47 window_server_->user_id_tracker()->AddObserver(this); |
| 48 } | 48 } |
| (...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 400 } | 400 } |
| 401 | 401 |
| 402 void Display::OnWindowManagerWindowTreeFactoryReady( | 402 void Display::OnWindowManagerWindowTreeFactoryReady( |
| 403 WindowManagerWindowTreeFactory* factory) { | 403 WindowManagerWindowTreeFactory* factory) { |
| 404 if (!binding_) | 404 if (!binding_) |
| 405 CreateWindowManagerDisplayRootFromFactory(factory); | 405 CreateWindowManagerDisplayRootFromFactory(factory); |
| 406 } | 406 } |
| 407 | 407 |
| 408 } // namespace ws | 408 } // namespace ws |
| 409 } // namespace ui | 409 } // namespace ui |
| OLD | NEW |