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

Unified Diff: ash/wm/power_button_controller.cc

Issue 1019623002: Remove DisplayState from the public interface for DisplayConfigurator (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/wm/lock_state_controller_unittest.cc ('k') | extensions/shell/browser/shell_desktop_controller_aura.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/power_button_controller.cc
diff --git a/ash/wm/power_button_controller.cc b/ash/wm/power_button_controller.cc
index 5d70803b134f82e10f7fd829e49349aaedc48a6b..5899b8a472675b02d1666dccbfb391b118a7f9a7 100644
--- a/ash/wm/power_button_controller.cc
+++ b/ash/wm/power_button_controller.cc
@@ -145,12 +145,11 @@ void PowerButtonController::OnDisplayModeChanged(
const ui::DisplayConfigurator::DisplayStateList& display_states) {
bool internal_display_off = false;
bool external_display_on = false;
- for (size_t i = 0; i < display_states.size(); ++i) {
- const ui::DisplayConfigurator::DisplayState& state = display_states[i];
- if (state.display->type() == ui::DISPLAY_CONNECTION_TYPE_INTERNAL) {
- if (!state.display->current_mode())
+ for (const ui::DisplaySnapshot* display : display_states) {
+ if (display->type() == ui::DISPLAY_CONNECTION_TYPE_INTERNAL) {
+ if (!display->current_mode())
internal_display_off = true;
- } else if (state.display->current_mode()) {
+ } else if (display->current_mode()) {
external_display_on = true;
}
}
« no previous file with comments | « ash/wm/lock_state_controller_unittest.cc ('k') | extensions/shell/browser/shell_desktop_controller_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698