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

Side by Side Diff: ash/display/display_error_observer_chromeos.cc

Issue 923273003: Update diplays even if configuration failed during startup (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix test build Created 5 years, 10 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/display/display_error_observer_chromeos.h" 5 #include "ash/display/display_error_observer_chromeos.h"
6 6
7 #include "ash/system/system_notifier.h" 7 #include "ash/system/system_notifier.h"
8 #include "grit/ash_resources.h" 8 #include "grit/ash_resources.h"
9 #include "grit/ash_strings.h" 9 #include "grit/ash_strings.h"
10 #include "ui/base/l10n/l10n_util.h" 10 #include "ui/base/l10n/l10n_util.h"
(...skipping 12 matching lines...) Expand all
23 23
24 } // namespace 24 } // namespace
25 25
26 DisplayErrorObserver::DisplayErrorObserver() { 26 DisplayErrorObserver::DisplayErrorObserver() {
27 } 27 }
28 28
29 DisplayErrorObserver::~DisplayErrorObserver() { 29 DisplayErrorObserver::~DisplayErrorObserver() {
30 } 30 }
31 31
32 void DisplayErrorObserver::OnDisplayModeChangeFailed( 32 void DisplayErrorObserver::OnDisplayModeChangeFailed(
33 const ui::DisplayConfigurator::DisplayStateList& displays,
33 ui::MultipleDisplayState new_state) { 34 ui::MultipleDisplayState new_state) {
34 // Always remove the notification to make sure the notification appears 35 // Always remove the notification to make sure the notification appears
35 // as a popup in any situation. 36 // as a popup in any situation.
36 message_center::MessageCenter::Get()->RemoveNotification( 37 message_center::MessageCenter::Get()->RemoveNotification(
37 kDisplayErrorNotificationId, false /* by_user */); 38 kDisplayErrorNotificationId, false /* by_user */);
38 39
39 int message_id = (new_state == ui::MULTIPLE_DISPLAY_STATE_DUAL_MIRROR) ? 40 int message_id = (new_state == ui::MULTIPLE_DISPLAY_STATE_DUAL_MIRROR) ?
40 IDS_ASH_DISPLAY_FAILURE_ON_MIRRORING : 41 IDS_ASH_DISPLAY_FAILURE_ON_MIRRORING :
41 IDS_ASH_DISPLAY_FAILURE_ON_NON_MIRRORING; 42 IDS_ASH_DISPLAY_FAILURE_ON_NON_MIRRORING;
42 43
(...skipping 20 matching lines...) Expand all
63 for (message_center::NotificationList::Notifications::const_iterator iter = 64 for (message_center::NotificationList::Notifications::const_iterator iter =
64 notifications.begin(); iter != notifications.end(); ++iter) { 65 notifications.begin(); iter != notifications.end(); ++iter) {
65 if ((*iter)->id() == kDisplayErrorNotificationId) 66 if ((*iter)->id() == kDisplayErrorNotificationId)
66 return (*iter)->title(); 67 return (*iter)->title();
67 } 68 }
68 69
69 return base::string16(); 70 return base::string16();
70 } 71 }
71 72
72 } // namespace ash 73 } // namespace ash
OLDNEW
« no previous file with comments | « ash/display/display_error_observer_chromeos.h ('k') | ash/display/display_error_observer_chromeos_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698