Chromium Code Reviews| 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; |
| } |