| 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/launcher/chrome_launcher_controller.h" | 5 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "ash/ash_switches.h" | 11 #include "ash/ash_switches.h" |
| 12 #include "ash/common/shelf/shelf_item_delegate_manager.h" | 12 #include "ash/common/shelf/shelf_item_delegate_manager.h" |
| 13 #include "ash/common/shelf/shelf_model.h" | 13 #include "ash/common/shelf/shelf_model.h" |
| 14 #include "ash/common/system/tray/system_tray_delegate.h" | 14 #include "ash/common/system/tray/system_tray_delegate.h" |
| 15 #include "ash/common/wm_shell.h" |
| 15 #include "ash/desktop_background/desktop_background_controller.h" | 16 #include "ash/desktop_background/desktop_background_controller.h" |
| 16 #include "ash/multi_profile_uma.h" | 17 #include "ash/multi_profile_uma.h" |
| 17 #include "ash/root_window_controller.h" | 18 #include "ash/root_window_controller.h" |
| 18 #include "ash/shelf/shelf.h" | 19 #include "ash/shelf/shelf.h" |
| 19 #include "ash/shell.h" | 20 #include "ash/shell.h" |
| 20 #include "ash/wm/window_util.h" | 21 #include "ash/wm/window_util.h" |
| 21 #include "base/command_line.h" | 22 #include "base/command_line.h" |
| 22 #include "base/macros.h" | 23 #include "base/macros.h" |
| 23 #include "base/strings/pattern.h" | 24 #include "base/strings/pattern.h" |
| 24 #include "base/strings/string_util.h" | 25 #include "base/strings/string_util.h" |
| (...skipping 977 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1002 controller->ActiveUserChanged(user_email); | 1003 controller->ActiveUserChanged(user_email); |
| 1003 // Update the user specific shell properties from the new user profile. | 1004 // Update the user specific shell properties from the new user profile. |
| 1004 UpdateAppLaunchersFromPref(); | 1005 UpdateAppLaunchersFromPref(); |
| 1005 SetShelfBehaviorsFromPrefs(); | 1006 SetShelfBehaviorsFromPrefs(); |
| 1006 SetVirtualKeyboardBehaviorFromPrefs(); | 1007 SetVirtualKeyboardBehaviorFromPrefs(); |
| 1007 | 1008 |
| 1008 // Restore the order of running, but unpinned applications for the activated | 1009 // Restore the order of running, but unpinned applications for the activated |
| 1009 // user. | 1010 // user. |
| 1010 RestoreUnpinnedRunningApplicationOrder(user_email); | 1011 RestoreUnpinnedRunningApplicationOrder(user_email); |
| 1011 // Inform the system tray of the change. | 1012 // Inform the system tray of the change. |
| 1012 ash::Shell::GetInstance()->system_tray_delegate()->ActiveUserWasChanged(); | 1013 ash::WmShell::Get()->system_tray_delegate()->ActiveUserWasChanged(); |
| 1013 // Force on-screen keyboard to reset. | 1014 // Force on-screen keyboard to reset. |
| 1014 if (keyboard::IsKeyboardEnabled()) | 1015 if (keyboard::IsKeyboardEnabled()) |
| 1015 ash::Shell::GetInstance()->CreateKeyboard(); | 1016 ash::Shell::GetInstance()->CreateKeyboard(); |
| 1016 } | 1017 } |
| 1017 | 1018 |
| 1018 void ChromeLauncherController::AdditionalUserAddedToSession(Profile* profile) { | 1019 void ChromeLauncherController::AdditionalUserAddedToSession(Profile* profile) { |
| 1019 // Switch the running applications to the new user. | 1020 // Switch the running applications to the new user. |
| 1020 for (auto& controller : app_window_controllers_) | 1021 for (auto& controller : app_window_controllers_) |
| 1021 controller->AdditionalUserAddedToSession(profile); | 1022 controller->AdditionalUserAddedToSession(profile); |
| 1022 } | 1023 } |
| (...skipping 837 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1860 | 1861 |
| 1861 AppIconLoader* ChromeLauncherController::GetAppIconLoaderForApp( | 1862 AppIconLoader* ChromeLauncherController::GetAppIconLoaderForApp( |
| 1862 const std::string& app_id) { | 1863 const std::string& app_id) { |
| 1863 for (const auto& app_icon_loader : app_icon_loaders_) { | 1864 for (const auto& app_icon_loader : app_icon_loaders_) { |
| 1864 if (app_icon_loader->CanLoadImageForApp(app_id)) | 1865 if (app_icon_loader->CanLoadImageForApp(app_id)) |
| 1865 return app_icon_loader.get(); | 1866 return app_icon_loader.get(); |
| 1866 } | 1867 } |
| 1867 | 1868 |
| 1868 return nullptr; | 1869 return nullptr; |
| 1869 } | 1870 } |
| OLD | NEW |