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

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

Issue 2732813002: chromeos: Move files in //ash/common to //ash, part 1 (Closed)
Patch Set: rebase Created 3 years, 9 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/common/system/chromeos/devicetype_utils.h"
8 #include "ash/display/display_util.h" 7 #include "ash/display/display_util.h"
9 #include "ash/strings/grit/ash_strings.h" 8 #include "ash/strings/grit/ash_strings.h"
9 #include "ash/system/devicetype_utils.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
11 #include "ui/base/l10n/l10n_util.h" 11 #include "ui/base/l10n/l10n_util.h"
12 12
13 namespace ash { 13 namespace ash {
14 14
15 DisplayErrorObserver::DisplayErrorObserver() {} 15 DisplayErrorObserver::DisplayErrorObserver() {}
16 16
17 DisplayErrorObserver::~DisplayErrorObserver() {} 17 DisplayErrorObserver::~DisplayErrorObserver() {}
18 18
19 void DisplayErrorObserver::OnDisplayModeChangeFailed( 19 void DisplayErrorObserver::OnDisplayModeChangeFailed(
20 const display::DisplayConfigurator::DisplayStateList& displays, 20 const display::DisplayConfigurator::DisplayStateList& displays,
21 display::MultipleDisplayState new_state) { 21 display::MultipleDisplayState new_state) {
22 LOG(ERROR) << "Failed to configure the following display(s):"; 22 LOG(ERROR) << "Failed to configure the following display(s):";
23 for (auto* display : displays) { 23 for (auto* display : displays) {
24 LOG(ERROR) << "- Display with ID = " << display->display_id() 24 LOG(ERROR) << "- Display with ID = " << display->display_id()
25 << ", and EDID = " << base::HexEncode(display->edid().data(), 25 << ", and EDID = " << base::HexEncode(display->edid().data(),
26 display->edid().size()) 26 display->edid().size())
27 << "."; 27 << ".";
28 } 28 }
29 29
30 base::string16 message = 30 base::string16 message =
31 (new_state == display::MULTIPLE_DISPLAY_STATE_DUAL_MIRROR) 31 (new_state == display::MULTIPLE_DISPLAY_STATE_DUAL_MIRROR)
32 ? l10n_util::GetStringUTF16(IDS_ASH_DISPLAY_FAILURE_ON_MIRRORING) 32 ? l10n_util::GetStringUTF16(IDS_ASH_DISPLAY_FAILURE_ON_MIRRORING)
33 : ash::SubstituteChromeOSDeviceType( 33 : ash::SubstituteChromeOSDeviceType(
34 IDS_ASH_DISPLAY_FAILURE_ON_NON_MIRRORING); 34 IDS_ASH_DISPLAY_FAILURE_ON_NON_MIRRORING);
35 ShowDisplayErrorNotification(message, true); 35 ShowDisplayErrorNotification(message, true);
36 } 36 }
37 37
38 } // namespace ash 38 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698