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

Unified Diff: chrome/browser/extensions/display_info_provider_chromeos.cc

Issue 2799963003: Fix errors in display resolution change notifications (Closed)
Patch Set: Created 3 years, 8 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 | « no previous file | chrome/browser/ui/webui/options/chromeos/display_options_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/display_info_provider_chromeos.cc
diff --git a/chrome/browser/extensions/display_info_provider_chromeos.cc b/chrome/browser/extensions/display_info_provider_chromeos.cc
index a5a37a74f93a246a19855aaf45ad1c1d57b846b3..7e5b4c86ad9892151bd04fb9c086a4442a29058e 100644
--- a/chrome/browser/extensions/display_info_provider_chromeos.cc
+++ b/chrome/browser/extensions/display_info_provider_chromeos.cc
@@ -342,11 +342,9 @@ bool ValidateParamsForDisplay(const system_display::DisplayProperties& info,
return false;
}
- if (!display_manager->SetDisplayMode(id, new_mode)) {
- *error = "Unable to set the display mode.";
- return false;
- }
-
+ // We must prepare the notification before we set the mode, since setting
+ // the mode actually shows the notification, so it should be ready by then.
+ // crbug.com/701389.
stevenjb 2017/04/06 22:10:53 This is all kind of awkward. It looks like we do t
afakhry 2017/04/07 00:04:57 ResolutionNotificationController::OnDisplayConfigu
if (!display::Display::IsInternalDisplayId(id)) {
// For external displays, show a notification confirming the resolution
// change.
@@ -355,6 +353,11 @@ bool ValidateParamsForDisplay(const system_display::DisplayProperties& info,
->PrepareNotification(id, current_mode, new_mode,
base::Bind(&chromeos::StoreDisplayPrefs));
}
+
+ if (!display_manager->SetDisplayMode(id, new_mode)) {
+ *error = "Unable to set the display mode.";
+ return false;
+ }
}
return true;
}
« no previous file with comments | « no previous file | chrome/browser/ui/webui/options/chromeos/display_options_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698