OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_controller.h" | 5 #include "ash/accelerators/accelerator_controller.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 } else if (shell->output_configurator()->connected_output_count() > 1) { | 118 } else if (shell->output_configurator()->connected_output_count() > 1) { |
119 internal::OutputConfiguratorAnimation* animation = | 119 internal::OutputConfiguratorAnimation* animation = |
120 shell->output_configurator_animation(); | 120 shell->output_configurator_animation(); |
121 animation->StartFadeOutAnimation(base::Bind( | 121 animation->StartFadeOutAnimation(base::Bind( |
122 base::IgnoreResult(&chromeos::OutputConfigurator::CycleDisplayMode), | 122 base::IgnoreResult(&chromeos::OutputConfigurator::CycleDisplayMode), |
123 base::Unretained(shell->output_configurator()))); | 123 base::Unretained(shell->output_configurator()))); |
124 } | 124 } |
125 } | 125 } |
126 | 126 |
127 void HandleSwapPrimaryDisplay() { | 127 void HandleSwapPrimaryDisplay() { |
128 if (gfx::Screen::GetNumDisplays() > 1) { | 128 if (Shell::GetScreen()->GetNumDisplays() > 1) { |
129 Shell::GetInstance()->display_controller()->SetPrimaryDisplay( | 129 Shell::GetInstance()->display_controller()->SetPrimaryDisplay( |
130 ScreenAsh::GetSecondaryDisplay()); | 130 ScreenAsh::GetSecondaryDisplay()); |
131 } | 131 } |
132 } | 132 } |
133 | 133 |
134 #endif // defined(OS_CHROMEOS) | 134 #endif // defined(OS_CHROMEOS) |
135 | 135 |
136 bool HandleExit() { | 136 bool HandleExit() { |
137 ShellDelegate* delegate = Shell::GetInstance()->delegate(); | 137 ShellDelegate* delegate = Shell::GetInstance()->delegate(); |
138 if (!delegate) | 138 if (!delegate) |
(...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
882 accelerators_.insert( | 882 accelerators_.insert( |
883 std::make_pair(accelerator, accelerators[i].action)); | 883 std::make_pair(accelerator, accelerators[i].action)); |
884 } | 884 } |
885 } | 885 } |
886 | 886 |
887 bool AcceleratorController::CanHandleAccelerators() const { | 887 bool AcceleratorController::CanHandleAccelerators() const { |
888 return true; | 888 return true; |
889 } | 889 } |
890 | 890 |
891 } // namespace ash | 891 } // namespace ash |
OLD | NEW |