| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ash/display/window_tree_host_manager.h" | 5 #include "ash/display/window_tree_host_manager.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 for (aura::Window::Windows::iterator iter = root_windows.begin(); | 274 for (aura::Window::Windows::iterator iter = root_windows.begin(); |
| 275 iter != root_windows.end(); ++iter) { | 275 iter != root_windows.end(); ++iter) { |
| 276 RootWindowController* rwc = GetRootWindowController(*iter); | 276 RootWindowController* rwc = GetRootWindowController(*iter); |
| 277 if (GetRootWindowSettings(*iter)->display_id == primary_id) | 277 if (GetRootWindowSettings(*iter)->display_id == primary_id) |
| 278 primary_rwc = rwc; | 278 primary_rwc = rwc; |
| 279 else | 279 else |
| 280 to_delete.push_back(rwc); | 280 to_delete.push_back(rwc); |
| 281 } | 281 } |
| 282 CHECK(primary_rwc); | 282 CHECK(primary_rwc); |
| 283 | 283 |
| 284 STLDeleteElements(&to_delete); | 284 base::STLDeleteElements(&to_delete); |
| 285 delete primary_rwc; | 285 delete primary_rwc; |
| 286 } | 286 } |
| 287 | 287 |
| 288 void WindowTreeHostManager::CreatePrimaryHost( | 288 void WindowTreeHostManager::CreatePrimaryHost( |
| 289 const AshWindowTreeHostInitParams& init_params) { | 289 const AshWindowTreeHostInitParams& init_params) { |
| 290 const display::Display& primary_candidate = | 290 const display::Display& primary_candidate = |
| 291 GetDisplayManager()->GetPrimaryDisplayCandidate(); | 291 GetDisplayManager()->GetPrimaryDisplayCandidate(); |
| 292 primary_display_id = primary_candidate.id(); | 292 primary_display_id = primary_candidate.id(); |
| 293 CHECK_NE(display::Display::kInvalidDisplayID, primary_display_id); | 293 CHECK_NE(display::Display::kInvalidDisplayID, primary_display_id); |
| 294 AddWindowTreeHostForDisplay(primary_candidate, init_params); | 294 AddWindowTreeHostForDisplay(primary_candidate, init_params); |
| (...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 845 SetDisplayPropertiesOnHost(ash_host, display); | 845 SetDisplayPropertiesOnHost(ash_host, display); |
| 846 | 846 |
| 847 #if defined(OS_CHROMEOS) | 847 #if defined(OS_CHROMEOS) |
| 848 if (switches::ConstrainPointerToRoot()) | 848 if (switches::ConstrainPointerToRoot()) |
| 849 ash_host->ConfineCursorToRootWindow(); | 849 ash_host->ConfineCursorToRootWindow(); |
| 850 #endif | 850 #endif |
| 851 return ash_host; | 851 return ash_host; |
| 852 } | 852 } |
| 853 | 853 |
| 854 } // namespace ash | 854 } // namespace ash |
| OLD | NEW |