| 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 d981386da44304c48d8c8fffb92970c2f2dbd189..a7dc13e29d093f2fb7a283e22162fe0e78aee8db 100644
|
| --- a/chrome/browser/extensions/display_info_provider_chromeos.cc
|
| +++ b/chrome/browser/extensions/display_info_provider_chromeos.cc
|
| @@ -352,19 +352,19 @@ bool ValidateParamsForDisplay(const system_display::DisplayProperties& info,
|
| return false;
|
| }
|
|
|
| - if (!display_manager->SetDisplayMode(id, new_mode)) {
|
| + // If it's the internal display, the display mode will be applied directly,
|
| + // otherwise a confirm/revert notification will be prepared first, and the
|
| + // display mode will be applied. If the user accepts the mode change by
|
| + // dismissing the notification, StoreDisplayPrefs() will be called back to
|
| + // persist the new preferences.
|
| + if (!ash::Shell::Get()
|
| + ->resolution_notification_controller()
|
| + ->PrepareNotificationAndSetDisplayMode(
|
| + id, current_mode, new_mode,
|
| + base::Bind(&chromeos::StoreDisplayPrefs))) {
|
| *error = "Unable to set the display mode.";
|
| return false;
|
| }
|
| -
|
| - if (!display::Display::IsInternalDisplayId(id)) {
|
| - // For external displays, show a notification confirming the resolution
|
| - // change.
|
| - ash::Shell::Get()
|
| - ->resolution_notification_controller()
|
| - ->PrepareNotification(id, current_mode, new_mode,
|
| - base::Bind(&chromeos::StoreDisplayPrefs));
|
| - }
|
| }
|
| return true;
|
| }
|
|
|