| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.h" | 5 #include "chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.h" |
| 6 | 6 |
| 7 #include "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
| 8 #include "ash/multi_profile_uma.h" | 8 #include "ash/multi_profile_uma.h" |
| 9 #include "ash/root_window_controller.h" | 9 #include "ash/root_window_controller.h" |
| 10 #include "ash/session/session_state_delegate.h" | 10 #include "ash/session/session_state_delegate.h" |
| (...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 379 | 379 |
| 380 // Account all existing application windows of this user accordingly. | 380 // Account all existing application windows of this user accordingly. |
| 381 const extensions::AppWindowRegistry::AppWindowList& app_windows = | 381 const extensions::AppWindowRegistry::AppWindowList& app_windows = |
| 382 extensions::AppWindowRegistry::Get(profile)->app_windows(); | 382 extensions::AppWindowRegistry::Get(profile)->app_windows(); |
| 383 extensions::AppWindowRegistry::AppWindowList::const_iterator it = | 383 extensions::AppWindowRegistry::AppWindowList::const_iterator it = |
| 384 app_windows.begin(); | 384 app_windows.begin(); |
| 385 for (; it != app_windows.end(); ++it) | 385 for (; it != app_windows.end(); ++it) |
| 386 user_id_to_app_observer_[user_id]->OnAppWindowAdded(*it); | 386 user_id_to_app_observer_[user_id]->OnAppWindowAdded(*it); |
| 387 | 387 |
| 388 // Account all existing browser windows of this user accordingly. | 388 // Account all existing browser windows of this user accordingly. |
| 389 BrowserList* browser_list = BrowserList::GetInstance(HOST_DESKTOP_TYPE_ASH); | 389 BrowserList* browser_list = |
| 390 BrowserList::GetInstance(ui::HOST_DESKTOP_TYPE_ASH); |
| 390 BrowserList::const_iterator browser_it = browser_list->begin(); | 391 BrowserList::const_iterator browser_it = browser_list->begin(); |
| 391 for (; browser_it != browser_list->end(); ++browser_it) { | 392 for (; browser_it != browser_list->end(); ++browser_it) { |
| 392 if ((*browser_it)->profile()->GetOriginalProfile() == profile) | 393 if ((*browser_it)->profile()->GetOriginalProfile() == profile) |
| 393 AddBrowserWindow(*browser_it); | 394 AddBrowserWindow(*browser_it); |
| 394 } | 395 } |
| 395 // When adding another user to the session, we auto switch users. | 396 // When adding another user to the session, we auto switch users. |
| 396 if (user_id_to_app_observer_.size() == 1) | 397 if (user_id_to_app_observer_.size() == 1) |
| 397 return; | 398 return; |
| 398 | 399 |
| 399 // Don't do anything special in case of user session restore after crash. | 400 // Don't do anything special in case of user session restore after crash. |
| (...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 740 DCHECK_EQ(visible, window->IsVisible()); | 741 DCHECK_EQ(visible, window->IsVisible()); |
| 741 } | 742 } |
| 742 | 743 |
| 743 int MultiUserWindowManagerChromeOS::GetAdjustedAnimationTimeInMS( | 744 int MultiUserWindowManagerChromeOS::GetAdjustedAnimationTimeInMS( |
| 744 int default_time_in_ms) const { | 745 int default_time_in_ms) const { |
| 745 return animation_speed_ == ANIMATION_SPEED_NORMAL ? default_time_in_ms : | 746 return animation_speed_ == ANIMATION_SPEED_NORMAL ? default_time_in_ms : |
| 746 (animation_speed_ == ANIMATION_SPEED_FAST ? 10 : 0); | 747 (animation_speed_ == ANIMATION_SPEED_FAST ? 10 : 0); |
| 747 } | 748 } |
| 748 | 749 |
| 749 } // namespace chrome | 750 } // namespace chrome |
| OLD | NEW |