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

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

Issue 253183003: Media indicator for background recording task (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: test Created 6 years, 7 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 | Annotate | Revision Log
OLDNEW
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 "apps/app_window.h" 7 #include "apps/app_window.h"
8 #include "apps/app_window_registry.h" 8 #include "apps/app_window_registry.h"
9 #include "ash/ash_switches.h" 9 #include "ash/ash_switches.h"
10 #include "ash/multi_profile_uma.h" 10 #include "ash/multi_profile_uma.h"
11 #include "ash/root_window_controller.h" 11 #include "ash/root_window_controller.h"
12 #include "ash/session/session_state_delegate.h" 12 #include "ash/session/session_state_delegate.h"
13 #include "ash/shelf/shelf.h" 13 #include "ash/shelf/shelf.h"
14 #include "ash/shell.h" 14 #include "ash/shell.h"
15 #include "ash/shell_delegate.h" 15 #include "ash/shell_delegate.h"
16 #include "ash/shell_window_ids.h" 16 #include "ash/shell_window_ids.h"
17 #include "ash/system/tray/system_tray_notifier.h"
17 #include "ash/wm/window_state.h" 18 #include "ash/wm/window_state.h"
18 #include "base/auto_reset.h" 19 #include "base/auto_reset.h"
19 #include "base/message_loop/message_loop.h" 20 #include "base/message_loop/message_loop.h"
20 #include "base/strings/string_util.h" 21 #include "base/strings/string_util.h"
21 #include "chrome/browser/browser_process.h" 22 #include "chrome/browser/browser_process.h"
22 #include "chrome/browser/chrome_notification_types.h" 23 #include "chrome/browser/chrome_notification_types.h"
23 #include "chrome/browser/chromeos/login/user_manager.h" 24 #include "chrome/browser/chromeos/login/user_manager.h"
24 #include "chrome/browser/profiles/profile.h" 25 #include "chrome/browser/profiles/profile.h"
25 #include "chrome/browser/profiles/profile_manager.h" 26 #include "chrome/browser/profiles/profile_manager.h"
26 #include "chrome/browser/ui/ash/multi_user/multi_user_notification_blocker_chrom eos.h" 27 #include "chrome/browser/ui/ash/multi_user/multi_user_notification_blocker_chrom eos.h"
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 393
393 void MultiUserWindowManagerChromeOS::ActiveUserChanged( 394 void MultiUserWindowManagerChromeOS::ActiveUserChanged(
394 const std::string& user_id) { 395 const std::string& user_id) {
395 DCHECK(user_id != current_user_id_); 396 DCHECK(user_id != current_user_id_);
396 // This needs to be set before the animation starts. 397 // This needs to be set before the animation starts.
397 current_user_id_ = user_id; 398 current_user_id_ = user_id;
398 399
399 animation_.reset( 400 animation_.reset(
400 new UserSwichAnimatorChromeOS( 401 new UserSwichAnimatorChromeOS(
401 this, user_id, GetAdjustedAnimationTimeInMS(kUserFadeTimeMS))); 402 this, user_id, GetAdjustedAnimationTimeInMS(kUserFadeTimeMS)));
403 // Call notifier here instead of observing ActiveUserChanged because
404 // this must happen after MultiUserWindowManagerChromeOS is notified.
405 ash::Shell::GetInstance()
406 ->system_tray_notifier()
407 ->NotifyMediaCaptureChanged();
402 } 408 }
403 409
404 void MultiUserWindowManagerChromeOS::OnWindowDestroyed(aura::Window* window) { 410 void MultiUserWindowManagerChromeOS::OnWindowDestroyed(aura::Window* window) {
405 if (GetWindowOwner(window).empty()) { 411 if (GetWindowOwner(window).empty()) {
406 // This must be a window in the transient chain - remove it and its 412 // This must be a window in the transient chain - remove it and its
407 // children from the owner. 413 // children from the owner.
408 RemoveTransientOwnerRecursive(window); 414 RemoveTransientOwnerRecursive(window);
409 return; 415 return;
410 } 416 }
411 wm::TransientWindowManager::Get(window)->RemoveObserver(this); 417 wm::TransientWindowManager::Get(window)->RemoveObserver(this);
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
700 DCHECK_EQ(visible, window->IsVisible()); 706 DCHECK_EQ(visible, window->IsVisible());
701 } 707 }
702 708
703 int MultiUserWindowManagerChromeOS::GetAdjustedAnimationTimeInMS( 709 int MultiUserWindowManagerChromeOS::GetAdjustedAnimationTimeInMS(
704 int default_time_in_ms) { 710 int default_time_in_ms) {
705 return animation_speed_ == ANIMATION_SPEED_NORMAL ? default_time_in_ms : 711 return animation_speed_ == ANIMATION_SPEED_NORMAL ? default_time_in_ms :
706 (animation_speed_ == ANIMATION_SPEED_FAST ? 10 : 0); 712 (animation_speed_ == ANIMATION_SPEED_FAST ? 10 : 0);
707 } 713 }
708 714
709 } // namespace chrome 715 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698