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

Side by Side Diff: chrome/browser/ui/ash/multi_user/user_switch_util.cc

Issue 2729363002: chromeos: Move files in //ash/common to //ash, part 3 (Closed)
Patch Set: Created 3 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/user_switch_util.h" 5 #include "chrome/browser/ui/ash/multi_user/user_switch_util.h"
6 6
7 #include "ash/common/wm_shell.h"
8 #include "ash/shell.h" 7 #include "ash/shell.h"
9 #include "ash/strings/grit/ash_strings.h" 8 #include "ash/strings/grit/ash_strings.h"
10 #include "ash/system/screen_security/screen_tray_item.h" 9 #include "ash/system/screen_security/screen_tray_item.h"
11 #include "ash/system/tray/system_tray.h" 10 #include "ash/system/tray/system_tray.h"
12 #include "ash/wm/overview/window_selector_controller.h" 11 #include "ash/wm/overview/window_selector_controller.h"
12 #include "ash/wm_shell.h"
13 #include "chrome/browser/ui/simple_message_box.h" 13 #include "chrome/browser/ui/simple_message_box.h"
14 #include "ui/base/l10n/l10n_util.h" 14 #include "ui/base/l10n/l10n_util.h"
15 15
16 void TrySwitchingActiveUser(const base::Callback<void()> on_switch) { 16 void TrySwitchingActiveUser(const base::Callback<void()> on_switch) {
17 // Some unit tests do not have a shell. In that case simply execute. 17 // Some unit tests do not have a shell. In that case simply execute.
18 if (!ash::Shell::HasInstance()) { 18 if (!ash::Shell::HasInstance()) {
19 on_switch.Run(); 19 on_switch.Run();
20 return; 20 return;
21 } 21 }
22 22
(...skipping 20 matching lines...) Expand all
43 ash::SystemTray* system_tray = 43 ash::SystemTray* system_tray =
44 ash::Shell::GetInstance()->GetPrimarySystemTray(); 44 ash::Shell::GetInstance()->GetPrimarySystemTray();
45 if (system_tray->GetScreenShareItem()->is_started()) 45 if (system_tray->GetScreenShareItem()->is_started())
46 system_tray->GetScreenShareItem()->Stop(); 46 system_tray->GetScreenShareItem()->Stop();
47 if (system_tray->GetScreenCaptureItem()->is_started()) 47 if (system_tray->GetScreenCaptureItem()->is_started())
48 system_tray->GetScreenCaptureItem()->Stop(); 48 system_tray->GetScreenCaptureItem()->Stop();
49 49
50 on_switch.Run(); 50 on_switch.Run();
51 } 51 }
52 } 52 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698