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

Unified Diff: chromeos/display/output_configurator.cc

Issue 12496020: Use OutputConfigurator::SetDislpayMode for ctrl-fullscreen (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 | « chromeos/display/output_configurator.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/display/output_configurator.cc
diff --git a/chromeos/display/output_configurator.cc b/chromeos/display/output_configurator.cc
index cb8210fd828028b2e200b618562fc052bb0234b0..3031b83bb4e09fac6276a34730deb477fc9c617d 100644
--- a/chromeos/display/output_configurator.cc
+++ b/chromeos/display/output_configurator.cc
@@ -622,45 +622,6 @@ void OutputConfigurator::Stop() {
configure_display_ = false;
}
-bool OutputConfigurator::CycleDisplayMode() {
- TRACE_EVENT0("chromeos", "OutputConfigurator::CycleDisplayMode");
- VLOG(1) << "CycleDisplayMode";
- if (!configure_display_)
- return false;
-
- bool did_change = false;
- Display* display = base::MessagePumpAuraX11::GetDefaultXDisplay();
- CHECK(display != NULL);
- XGrabServer(display);
- Window window = DefaultRootWindow(display);
- XRRScreenResources* screen = GetScreenResourcesAndRecordUMA(display, window);
- CHECK(screen != NULL);
-
- std::vector<OutputSnapshot> outputs = GetDualOutputs(display, screen);
- connected_output_count_ = outputs.size();
- OutputState original = InferCurrentState(display, screen, outputs);
- OutputState next_state = GetNextState(display, screen, original, outputs);
- if (original != next_state &&
- EnterState(display, screen, window, next_state, power_state_, outputs)) {
- did_change = true;
- }
- // We have seen cases where the XRandR data can get out of sync with our own
- // cache so over-write it with whatever we detected, even if we didn't think
- // anything changed.
- output_state_ = next_state;
-
- XRRFreeScreenResources(screen);
- XUngrabServer(display);
-
- if (did_change) {
- NotifyOnDisplayChanged();
- } else {
- FOR_EACH_OBSERVER(
- Observer, observers_, OnDisplayModeChangeFailed(next_state));
- }
- return did_change;
-}
-
bool OutputConfigurator::SetDisplayPower(DisplayPowerState power_state,
bool force_probe) {
TRACE_EVENT0("chromeos", "OutputConfigurator::SetDisplayPower");
« no previous file with comments | « chromeos/display/output_configurator.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698