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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 } else if (shell->output_configurator()->connected_output_count() > 1) { | 116 } else if (shell->output_configurator()->connected_output_count() > 1) { |
117 internal::OutputConfiguratorAnimation* animation = | 117 internal::OutputConfiguratorAnimation* animation = |
118 shell->output_configurator_animation(); | 118 shell->output_configurator_animation(); |
119 animation->StartFadeOutAnimation(base::Bind( | 119 animation->StartFadeOutAnimation(base::Bind( |
120 base::IgnoreResult(&chromeos::OutputConfigurator::CycleDisplayMode), | 120 base::IgnoreResult(&chromeos::OutputConfigurator::CycleDisplayMode), |
121 base::Unretained(shell->output_configurator()))); | 121 base::Unretained(shell->output_configurator()))); |
122 } | 122 } |
123 } | 123 } |
124 | 124 |
125 void HandleSwapPrimaryDisplay() { | 125 void HandleSwapPrimaryDisplay() { |
126 if (gfx::Screen::GetNumDisplays() > 1) { | 126 if (Shell::GetAshScreen()->GetNumDisplays() > 1) { |
127 Shell::GetInstance()->display_controller()->SetPrimaryDisplay( | 127 Shell::GetInstance()->display_controller()->SetPrimaryDisplay( |
128 ScreenAsh::GetSecondaryDisplay()); | 128 ScreenAsh::GetSecondaryDisplay()); |
129 } | 129 } |
130 } | 130 } |
131 | 131 |
132 #endif // defined(OS_CHROMEOS) | 132 #endif // defined(OS_CHROMEOS) |
133 | 133 |
134 bool HandleExit() { | 134 bool HandleExit() { |
135 ShellDelegate* delegate = Shell::GetInstance()->delegate(); | 135 ShellDelegate* delegate = Shell::GetInstance()->delegate(); |
136 if (!delegate) | 136 if (!delegate) |
(...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
861 accelerators_.insert( | 861 accelerators_.insert( |
862 std::make_pair(accelerator, accelerators[i].action)); | 862 std::make_pair(accelerator, accelerators[i].action)); |
863 } | 863 } |
864 } | 864 } |
865 | 865 |
866 bool AcceleratorController::CanHandleAccelerators() const { | 866 bool AcceleratorController::CanHandleAccelerators() const { |
867 return true; | 867 return true; |
868 } | 868 } |
869 | 869 |
870 } // namespace ash | 870 } // namespace ash |
OLD | NEW |