| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "ui/display/manager/chromeos/x11/display_util_x11.h" | 5 #include "ui/display/manager/chromeos/x11/display_util_x11.h" |
| 6 | 6 |
| 7 #include "base/macros.h" | 7 #include "base/macros.h" |
| 8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
| 9 | 9 |
| 10 namespace ui { | 10 namespace display { |
| 11 | 11 |
| 12 namespace { | 12 namespace { |
| 13 | 13 |
| 14 struct DisplayConnectionTypeMapping { | 14 struct DisplayConnectionTypeMapping { |
| 15 // Prefix of output name. | 15 // Prefix of output name. |
| 16 const char* name; | 16 const char* name; |
| 17 DisplayConnectionType type; | 17 DisplayConnectionType type; |
| 18 }; | 18 }; |
| 19 | 19 |
| 20 const DisplayConnectionTypeMapping kDisplayConnectionTypeMapping[] = { | 20 const DisplayConnectionTypeMapping kDisplayConnectionTypeMapping[] = { |
| (...skipping 12 matching lines...) Expand all Loading... |
| 33 for (unsigned int i = 0; i < arraysize(kDisplayConnectionTypeMapping); ++i) { | 33 for (unsigned int i = 0; i < arraysize(kDisplayConnectionTypeMapping); ++i) { |
| 34 if (base::StartsWith(name, kDisplayConnectionTypeMapping[i].name, | 34 if (base::StartsWith(name, kDisplayConnectionTypeMapping[i].name, |
| 35 base::CompareCase::SENSITIVE)) { | 35 base::CompareCase::SENSITIVE)) { |
| 36 return kDisplayConnectionTypeMapping[i].type; | 36 return kDisplayConnectionTypeMapping[i].type; |
| 37 } | 37 } |
| 38 } | 38 } |
| 39 | 39 |
| 40 return DISPLAY_CONNECTION_TYPE_UNKNOWN; | 40 return DISPLAY_CONNECTION_TYPE_UNKNOWN; |
| 41 } | 41 } |
| 42 | 42 |
| 43 } // namespace ui | 43 } // namespace display |
| OLD | NEW |