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

Unified Diff: chrome/browser/ui/ash/multi_user/user_switch_util.cc

Issue 2273103003: [ash-md] Cancels overview mode before switching user profiles (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: [ash-md] Cancels overview mode before switching user profiles (nit) Created 4 years, 4 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/multi_user/user_switch_util.cc
diff --git a/chrome/browser/ui/ash/multi_user/user_switch_util.cc b/chrome/browser/ui/ash/multi_user/user_switch_util.cc
index 217ab86e84e6beb9db3accbe95e787b2b1782190..6a80b5ef145268df15cffbd738187223e26fa6b6 100644
--- a/chrome/browser/ui/ash/multi_user/user_switch_util.cc
+++ b/chrome/browser/ui/ash/multi_user/user_switch_util.cc
@@ -7,6 +7,8 @@
#include "ash/common/strings/grit/ash_strings.h"
#include "ash/common/system/chromeos/screen_security/screen_tray_item.h"
#include "ash/common/system/tray/system_tray.h"
+#include "ash/common/wm/overview/window_selector_controller.h"
+#include "ash/common/wm_shell.h"
#include "ash/shell.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
@@ -172,6 +174,13 @@ void TrySwitchingActiveUser(const base::Callback<void()> on_switch) {
on_switch.Run();
return;
}
+
+ // Cancel overview mode when switching user profiles.
+ ash::WindowSelectorController* controller =
+ ash::WmShell::Get()->window_selector_controller();
+ if (controller->IsSelecting())
+ controller->ToggleOverview();
+
// If neither screen sharing nor capturing is going on we can immediately
// switch users.
ash::SystemTray* system_tray =
« no previous file with comments | « ash/common/wm/overview/window_selector_controller.cc ('k') | chrome/browser/ui/ash/multi_user/user_switch_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698