OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_manager.h" | 5 #include "services/ui/ws/display_manager.h" |
6 | 6 |
7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
8 #include "services/ui/display/platform_screen.h" | 8 #include "services/ui/display/platform_screen.h" |
9 #include "services/ui/ws/display.h" | 9 #include "services/ui/ws/display.h" |
10 #include "services/ui/ws/display_binding.h" | 10 #include "services/ui/ws/display_binding.h" |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 WindowManagerState* current_window_manager_state = | 163 WindowManagerState* current_window_manager_state = |
164 window_server_->GetWindowManagerStateForUser(active_id); | 164 window_server_->GetWindowManagerStateForUser(active_id); |
165 if (current_window_manager_state) | 165 if (current_window_manager_state) |
166 current_window_manager_state->Activate(mouse_location_on_screen); | 166 current_window_manager_state->Activate(mouse_location_on_screen); |
167 } | 167 } |
168 | 168 |
169 void DisplayManager::OnDisplayAdded(int64_t id, const gfx::Rect& bounds) { | 169 void DisplayManager::OnDisplayAdded(int64_t id, const gfx::Rect& bounds) { |
170 PlatformDisplayInitParams params; | 170 PlatformDisplayInitParams params; |
171 params.display_bounds = bounds; | 171 params.display_bounds = bounds; |
172 params.display_id = id; | 172 params.display_id = id; |
173 params.surfaces_state = window_server_->GetSurfacesState(); | 173 params.display_compositor = window_server_->GetDisplayCompositor(); |
174 | 174 |
175 ws::Display* display = new ws::Display(window_server_, params); | 175 ws::Display* display = new ws::Display(window_server_, params); |
176 display->Init(nullptr); | 176 display->Init(nullptr); |
177 | 177 |
178 window_server_->delegate()->UpdateTouchTransforms(); | 178 window_server_->delegate()->UpdateTouchTransforms(); |
179 } | 179 } |
180 | 180 |
181 void DisplayManager::OnDisplayRemoved(int64_t id) { | 181 void DisplayManager::OnDisplayRemoved(int64_t id) { |
182 Display* display = GetDisplayById(id); | 182 Display* display = GetDisplayById(id); |
183 if (display) | 183 if (display) |
184 DestroyDisplay(display); | 184 DestroyDisplay(display); |
185 } | 185 } |
186 | 186 |
187 void DisplayManager::OnDisplayModified(int64_t id, const gfx::Rect& bounds) { | 187 void DisplayManager::OnDisplayModified(int64_t id, const gfx::Rect& bounds) { |
188 // TODO(kylechar): Implement. | 188 // TODO(kylechar): Implement. |
189 NOTREACHED(); | 189 NOTREACHED(); |
190 } | 190 } |
191 | 191 |
192 } // namespace ws | 192 } // namespace ws |
193 } // namespace ui | 193 } // namespace ui |
OLD | NEW |