Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2787)

Unified Diff: chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc

Issue 130983007: Creating multi profile animations for switching users and teleporting of windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc
diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc b/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc
index c238e020bbd216fe25b9d9cfc6853fb15e099f3e..783533fe5fa6e9caeb1d754388799a398b7d1f59 100644
--- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc
+++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc
@@ -16,6 +16,7 @@
#include "ash/shelf/shelf_model.h"
#include "ash/shelf/shelf_widget.h"
#include "ash/shell.h"
+#include "ash/system/tray/system_tray_delegate.h"
#include "ash/wm/window_util.h"
#include "base/command_line.h"
#include "base/prefs/scoped_user_pref_update.h"
@@ -87,7 +88,6 @@
#if defined(OS_CHROMEOS)
#include "chrome/browser/browser_process.h"
#include "chrome/browser/chromeos/login/user_manager.h"
-#include "chrome/browser/chromeos/login/wallpaper_manager.h"
#include "chrome/browser/ui/ash/chrome_shell_delegate.h"
#include "chrome/browser/ui/ash/launcher/multi_profile_browser_status_monitor.h"
#include "chrome/browser/ui/ash/launcher/multi_profile_shell_window_launcher_controller.h"
@@ -243,7 +243,6 @@ class ChromeLauncherControllerUserSwitchObserverChromeOS
}
// chromeos::UserManager::UserSessionStateObserver overrides:
- virtual void ActiveUserChanged(const chromeos::User* active_user) OVERRIDE;
virtual void UserAddedToSession(const chromeos::User* added_user) OVERRIDE;
// content::NotificationObserver overrides:
@@ -269,17 +268,6 @@ class ChromeLauncherControllerUserSwitchObserverChromeOS
DISALLOW_COPY_AND_ASSIGN(ChromeLauncherControllerUserSwitchObserverChromeOS);
};
-void ChromeLauncherControllerUserSwitchObserverChromeOS::ActiveUserChanged(
- const chromeos::User* active_user) {
- const std::string& user_email = active_user->email();
- // Forward the OS specific event to the ChromeLauncherController.
- controller_->ActiveUserChanged(user_email);
- // TODO(skuhne): At the moment the login screen does the wallpaper management
- // and wallpapers are not synchronized across multiple desktops.
- if (chromeos::WallpaperManager::Get())
- chromeos::WallpaperManager::Get()->SetUserWallpaperDelayed(user_email);
-}
-
void ChromeLauncherControllerUserSwitchObserverChromeOS::UserAddedToSession(
const chromeos::User* active_user) {
Profile* profile = multi_user_util::GetProfileFromUserID(
@@ -1167,6 +1155,8 @@ void ChromeLauncherController::ActiveUserChanged(
// Restore the order of running, but unpinned applications for the activated
// user.
RestoreUnpinnedRunningApplicationOrder(user_email);
+ // Inform the system tray of the change.
+ ash::Shell::GetInstance()->system_tray_delegate()->ActiveUserWasChanged();
}
void ChromeLauncherController::AdditionalUserAddedToSession(Profile* profile) {
@@ -1690,8 +1680,8 @@ void ChromeLauncherController::SetShelfAutoHideBehaviorPrefs(
break;
case ash::SHELF_AUTO_HIDE_ALWAYS_HIDDEN:
// This one should not be a valid preference option for now. We only want
- // to completely hide it when we run app mode.
- NOTREACHED();
+ // to completely hide it when we run in app mode - or while we temporarily
+ // hide the shelf as part of an animation (e.g. the multi user change).
return;
}

Powered by Google App Engine
This is Rietveld 408576698