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

Unified Diff: ash/display/display_change_observer_x11.cc

Issue 12505005: Store rotation/ui scale to local state. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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/display/display_change_observer_x11.h ('k') | ash/display/display_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/display/display_change_observer_x11.cc
diff --git a/ash/display/display_change_observer_x11.cc b/ash/display/display_change_observer_x11.cc
index c7539a3a2e60752d8b379ac608ca54b5aa2df1f2..9af77395929af2db91798c0c9a59577bc89acaf8 100644
--- a/ash/display/display_change_observer_x11.cc
+++ b/ash/display/display_change_observer_x11.cc
@@ -15,6 +15,7 @@
#include "ash/display/display_manager.h"
#include "ash/shell.h"
#include "base/message_pump_aurax11.h"
+#include "ash/display/display_controller.h"
#include "grit/ash_strings.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/x/x11_util.h"
@@ -128,6 +129,17 @@ DisplayChangeObserverX11::DisplayChangeObserverX11()
DisplayChangeObserverX11::~DisplayChangeObserverX11() {
}
+chromeos::OutputState DisplayChangeObserverX11::GetStateForOutputs(
+ const std::vector<RROutput>& outputs) const {
+ CHECK(outputs.size() == 2);
+ DisplayIdPair pair = std::make_pair(GetDisplayId(outputs[0], 0),
+ GetDisplayId(outputs[1], 1));
+ DisplayLayout layout = Shell::GetInstance()->display_controller()->
+ GetRegisteredDisplayLayout(pair);
+ return layout.mirrored ?
+ chromeos::STATE_DUAL_MIRROR : chromeos::STATE_DUAL_EXTENDED;
+}
+
void DisplayChangeObserverX11::OnDisplayModeChanged() {
XRRScreenResources* screen_resources =
XRRGetScreenResources(xdisplay_, x_root_window_);
« no previous file with comments | « ash/display/display_change_observer_x11.h ('k') | ash/display/display_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698