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

Side by Side Diff: ash/accelerators/accelerator_controller.cc

Issue 11030017: Add context to gfx::Screen calls in support of simultaneous desktop+ash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix new addition Created 8 years, 2 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
« no previous file with comments | « no previous file | ash/dip_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | ash/dip_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698