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

Side by Side Diff: ash/system/chromeos/screen_layout_observer.cc

Issue 2400553002: ash: Remove broken display notification suppression when settings is open (Closed)
Patch Set: fix comment Created 4 years, 2 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 unified diff | Download patch
OLDNEW
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
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
OLDNEW
« no previous file with comments | « ash/system/chromeos/screen_layout_observer.h ('k') | ash/system/chromeos/screen_layout_observer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698