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

Unified Diff: ash/wm/power_button_controller.cc

Issue 187073002: Refactoring display configuration state to allow generic state objects (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 6 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/power_button_controller.h ('k') | ui/display/chromeos/display_mode.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 984890584284383b4714df8ece4d1a4b07158418..c2d63f9616d5b0c24859db1524b18213c9aaf31e 100644
--- a/ash/wm/power_button_controller.cc
+++ b/ash/wm/power_button_controller.cc
@@ -12,6 +12,7 @@
#include "ash/wm/session_state_animator.h"
#include "base/command_line.h"
#include "ui/aura/window_event_dispatcher.h"
+#include "ui/display/chromeos/display_snapshot.h"
#include "ui/wm/core/compound_event_filter.h"
namespace ash {
@@ -117,15 +118,15 @@ void PowerButtonController::OnLockButtonEvent(
#if defined(OS_CHROMEOS) && defined(USE_X11)
void PowerButtonController::OnDisplayModeChanged(
- const std::vector<ui::OutputConfigurator::OutputSnapshot>& outputs) {
+ const ui::OutputConfigurator::DisplayStateList& outputs) {
bool internal_display_off = false;
bool external_display_on = false;
for (size_t i = 0; i < outputs.size(); ++i) {
- const ui::OutputConfigurator::OutputSnapshot& output = outputs[i];
- if (output.type == ui::OUTPUT_TYPE_INTERNAL) {
- if (!output.current_mode)
+ const ui::OutputConfigurator::DisplayState& output = outputs[i];
+ if (output.display->type() == ui::OUTPUT_TYPE_INTERNAL) {
+ if (!output.display->current_mode())
internal_display_off = true;
- } else if (output.current_mode) {
+ } else if (output.display->current_mode()) {
external_display_on = true;
}
}
« no previous file with comments | « ash/wm/power_button_controller.h ('k') | ui/display/chromeos/display_mode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698