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

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 some new gfx::Screen additions 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') | ash/keyboard_overlay/keyboard_overlay_delegate.cc » ('J')
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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « no previous file | ash/dip_unittest.cc » ('j') | ash/keyboard_overlay/keyboard_overlay_delegate.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698