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

Side by Side Diff: ash/wm/power_button_controller.cc

Issue 2613493002: Fix namespace for src/ui/display/. (Closed)
Patch Set: Rebase. Created 3 years, 11 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
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/wm/power_button_controller.h" 5 #include "ash/wm/power_button_controller.h"
6 6
7 #include "ash/common/accelerators/accelerator_controller.h" 7 #include "ash/common/accelerators/accelerator_controller.h"
8 #include "ash/common/ash_switches.h" 8 #include "ash/common/ash_switches.h"
9 #include "ash/common/session/session_state_delegate.h" 9 #include "ash/common/session/session_state_delegate.h"
10 #include "ash/common/system/tray/system_tray.h" 10 #include "ash/common/system/tray/system_tray.h"
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 chromeos::CrasAudioHandler::Get(); 187 chromeos::CrasAudioHandler::Get();
188 volume_percent_before_screenshot_ = 188 volume_percent_before_screenshot_ =
189 audio_handler->GetOutputVolumePercent(); 189 audio_handler->GetOutputVolumePercent();
190 } 190 }
191 #endif 191 #endif
192 } 192 }
193 } 193 }
194 194
195 #if defined(OS_CHROMEOS) 195 #if defined(OS_CHROMEOS)
196 void PowerButtonController::OnDisplayModeChanged( 196 void PowerButtonController::OnDisplayModeChanged(
197 const ui::DisplayConfigurator::DisplayStateList& display_states) { 197 const display::DisplayConfigurator::DisplayStateList& display_states) {
198 bool internal_display_off = false; 198 bool internal_display_off = false;
199 bool external_display_on = false; 199 bool external_display_on = false;
200 for (const ui::DisplaySnapshot* display : display_states) { 200 for (const display::DisplaySnapshot* display : display_states) {
201 if (display->type() == ui::DISPLAY_CONNECTION_TYPE_INTERNAL) { 201 if (display->type() == display::DISPLAY_CONNECTION_TYPE_INTERNAL) {
202 if (!display->current_mode()) 202 if (!display->current_mode())
203 internal_display_off = true; 203 internal_display_off = true;
204 } else if (display->current_mode()) { 204 } else if (display->current_mode()) {
205 external_display_on = true; 205 external_display_on = true;
206 } 206 }
207 } 207 }
208 internal_display_off_and_external_display_on_ = 208 internal_display_off_and_external_display_on_ =
209 internal_display_off && external_display_on; 209 internal_display_off && external_display_on;
210 } 210 }
211 211
212 void PowerButtonController::PowerButtonEventReceived( 212 void PowerButtonController::PowerButtonEventReceived(
213 bool down, 213 bool down,
214 const base::TimeTicks& timestamp) { 214 const base::TimeTicks& timestamp) {
215 OnPowerButtonEvent(down, timestamp); 215 OnPowerButtonEvent(down, timestamp);
216 } 216 }
217 #endif // defined(OS_CHROMEOS) 217 #endif // defined(OS_CHROMEOS)
218 218
219 } // namespace ash 219 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/power_button_controller.h ('k') | chrome/browser/chromeos/dbus/chrome_display_power_service_provider_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698