| OLD | NEW |
| 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 "ash/accelerators/accelerator_commands.h" | 5 #include "ash/accelerators/accelerator_commands.h" |
| 6 | 6 |
| 7 #include "ash/display/display_manager.h" | 7 #include "ash/display/display_manager.h" |
| 8 #include "ash/display/display_util.h" | 8 #include "ash/display/display_util.h" |
| 9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
| 10 #include "ash/shell_delegate.h" | 10 #include "ash/shell_delegate.h" |
| 11 #include "ash/wm/common/wm_event.h" |
| 11 #include "ash/wm/mru_window_tracker.h" | 12 #include "ash/wm/mru_window_tracker.h" |
| 12 #include "ash/wm/window_state.h" | 13 #include "ash/wm/window_state.h" |
| 13 #include "ash/wm/window_util.h" | 14 #include "ash/wm/window_util.h" |
| 14 #include "ash/wm/wm_event.h" | |
| 15 #include "base/metrics/user_metrics.h" | 15 #include "base/metrics/user_metrics.h" |
| 16 | 16 |
| 17 namespace ash { | 17 namespace ash { |
| 18 namespace accelerators { | 18 namespace accelerators { |
| 19 | 19 |
| 20 bool ToggleMinimized() { | 20 bool ToggleMinimized() { |
| 21 aura::Window* window = wm::GetActiveWindow(); | 21 aura::Window* window = wm::GetActiveWindow(); |
| 22 // Attempt to restore the window that would be cycled through next from | 22 // Attempt to restore the window that would be cycled through next from |
| 23 // the launcher when there is no active window. | 23 // the launcher when there is no active window. |
| 24 if (!window) { | 24 if (!window) { |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 std::find_if(modes.begin(), modes.end(), | 100 std::find_if(modes.begin(), modes.end(), |
| 101 [](const DisplayMode& mode) { return mode.native; }); | 101 [](const DisplayMode& mode) { return mode.native; }); |
| 102 display_manager->SetDisplayMode(DisplayManager::kUnifiedDisplayId, *iter); | 102 display_manager->SetDisplayMode(DisplayManager::kUnifiedDisplayId, *iter); |
| 103 } else { | 103 } else { |
| 104 SetDisplayUIScale(display_manager->GetDisplayIdForUIScaling(), 1.0f); | 104 SetDisplayUIScale(display_manager->GetDisplayIdForUIScaling(), 1.0f); |
| 105 } | 105 } |
| 106 } | 106 } |
| 107 | 107 |
| 108 } // namespace accelerators | 108 } // namespace accelerators |
| 109 } // namespace ash | 109 } // namespace ash |
| OLD | NEW |