| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ash/system/chromeos/screen_layout_observer.h" | 5 #include "ash/system/chromeos/screen_layout_observer.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 WmShell::Get()->RecordUserMetricsAction( | 293 WmShell::Get()->RecordUserMetricsAction( |
| 294 UMA_STATUS_AREA_DISPLAY_NOTIFICATION_CREATED); | 294 UMA_STATUS_AREA_DISPLAY_NOTIFICATION_CREATED); |
| 295 message_center::MessageCenter::Get()->AddNotification( | 295 message_center::MessageCenter::Get()->AddNotification( |
| 296 std::move(notification)); | 296 std::move(notification)); |
| 297 } | 297 } |
| 298 | 298 |
| 299 void ScreenLayoutObserver::OnDisplayConfigurationChanged() { | 299 void ScreenLayoutObserver::OnDisplayConfigurationChanged() { |
| 300 DisplayInfoMap old_info; | 300 DisplayInfoMap old_info; |
| 301 UpdateDisplayInfo(&old_info); | 301 UpdateDisplayInfo(&old_info); |
| 302 | 302 |
| 303 if (!WmShell::Get() | 303 if (!show_notifications_for_testing) |
| 304 ->system_tray_delegate() | |
| 305 ->ShouldShowDisplayNotification()) { | |
| 306 return; | 304 return; |
| 307 } | |
| 308 | 305 |
| 309 base::string16 message; | 306 base::string16 message; |
| 310 base::string16 additional_message; | 307 base::string16 additional_message; |
| 311 if (GetDisplayMessageForNotification(old_info, &message, &additional_message)) | 308 if (GetDisplayMessageForNotification(old_info, &message, &additional_message)) |
| 312 CreateOrUpdateNotification(message, additional_message); | 309 CreateOrUpdateNotification(message, additional_message); |
| 313 } | 310 } |
| 314 | 311 |
| 315 } // namespace ash | 312 } // namespace ash |
| OLD | NEW |