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

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

Issue 2629643002: chromeos: Renames WmWindowAura to WmWindow (Closed)
Patch Set: feedback Created 3 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 unified diff | Download patch
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 "ash/aura/wm_window_aura.h"
8 #include "ash/common/media_controller.h" 7 #include "ash/common/media_controller.h"
9 #include "ash/common/multi_profile_uma.h" 8 #include "ash/common/multi_profile_uma.h"
10 #include "ash/common/session/session_state_delegate.h" 9 #include "ash/common/session/session_state_delegate.h"
11 #include "ash/common/wm/maximize_mode/maximize_mode_controller.h" 10 #include "ash/common/wm/maximize_mode/maximize_mode_controller.h"
12 #include "ash/common/wm/window_state.h" 11 #include "ash/common/wm/window_state.h"
13 #include "ash/common/wm_shell.h" 12 #include "ash/common/wm_shell.h"
13 #include "ash/common/wm_window.h"
14 #include "ash/public/cpp/shell_window_ids.h" 14 #include "ash/public/cpp/shell_window_ids.h"
15 #include "ash/root_window_controller.h" 15 #include "ash/root_window_controller.h"
16 #include "ash/shell.h" 16 #include "ash/shell.h"
17 #include "ash/wm/window_state_aura.h" 17 #include "ash/wm/window_state_aura.h"
18 #include "base/auto_reset.h" 18 #include "base/auto_reset.h"
19 #include "base/macros.h" 19 #include "base/macros.h"
20 #include "base/message_loop/message_loop.h" 20 #include "base/message_loop/message_loop.h"
21 #include "base/strings/string_util.h" 21 #include "base/strings/string_util.h"
22 #include "chrome/browser/browser_process.h" 22 #include "chrome/browser/browser_process.h"
23 #include "chrome/browser/chrome_notification_types.h" 23 #include "chrome/browser/chrome_notification_types.h"
(...skipping 712 matching lines...) Expand 10 before | Expand all | Expand 10 after
736 void MultiUserWindowManagerChromeOS::SetWindowVisible( 736 void MultiUserWindowManagerChromeOS::SetWindowVisible(
737 aura::Window* window, 737 aura::Window* window,
738 bool visible, 738 bool visible,
739 int animation_time_in_ms) { 739 int animation_time_in_ms) {
740 // The MaximizeModeWindowManager will not handle invisible windows since they 740 // The MaximizeModeWindowManager will not handle invisible windows since they
741 // are not user activatable. Since invisible windows are not being tracked, 741 // are not user activatable. Since invisible windows are not being tracked,
742 // we tell it to maximize / track this window now before it gets shown, to 742 // we tell it to maximize / track this window now before it gets shown, to
743 // reduce animation jank from multiple resizes. 743 // reduce animation jank from multiple resizes.
744 if (visible) { 744 if (visible) {
745 ash::WmShell::Get()->maximize_mode_controller()->AddWindow( 745 ash::WmShell::Get()->maximize_mode_controller()->AddWindow(
746 ash::WmWindowAura::Get(window)); 746 ash::WmWindow::Get(window));
747 } 747 }
748 748
749 AnimationSetter animation_setter( 749 AnimationSetter animation_setter(
750 window, 750 window,
751 GetAdjustedAnimationTimeInMS(animation_time_in_ms)); 751 GetAdjustedAnimationTimeInMS(animation_time_in_ms));
752 752
753 if (visible) 753 if (visible)
754 window->Show(); 754 window->Show();
755 else 755 else
756 window->Hide(); 756 window->Hide();
757 } 757 }
758 758
759 int MultiUserWindowManagerChromeOS::GetAdjustedAnimationTimeInMS( 759 int MultiUserWindowManagerChromeOS::GetAdjustedAnimationTimeInMS(
760 int default_time_in_ms) const { 760 int default_time_in_ms) const {
761 return animation_speed_ == ANIMATION_SPEED_NORMAL ? default_time_in_ms : 761 return animation_speed_ == ANIMATION_SPEED_NORMAL ? default_time_in_ms :
762 (animation_speed_ == ANIMATION_SPEED_FAST ? 10 : 0); 762 (animation_speed_ == ANIMATION_SPEED_FAST ? 10 : 0);
763 } 763 }
764 764
765 } // namespace chrome 765 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698