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

Unified Diff: chromeos/display/real_output_configurator_delegate.cc

Issue 132983002: Replace OutputSnapshot |is_internal| with check against 'type == OUTPUT_TYPE_INTERNAL' (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chromeos/display/output_configurator_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/display/real_output_configurator_delegate.cc
diff --git a/chromeos/display/real_output_configurator_delegate.cc b/chromeos/display/real_output_configurator_delegate.cc
index 5bb4757e3b7b2288037f78d802230c4874126350..38c6471c1800622130c63367caea3f7a5f2a8cd7 100644
--- a/chromeos/display/real_output_configurator_delegate.cc
+++ b/chromeos/display/real_output_configurator_delegate.cc
@@ -277,13 +277,13 @@ RealOutputConfiguratorDelegate::InitOutputSnapshot(
output.width_mm = info->mm_width;
output.height_mm = info->mm_height;
output.has_display_id = base::GetDisplayId(id, index, &output.display_id);
- output.is_internal = IsInternalOutput(info);
output.index = index;
+ bool is_internal = IsInternalOutput(info);
// Use the index as a valid display ID even if the internal
// display doesn't have valid EDID because the index
// will never change.
- if (!output.has_display_id && output.is_internal)
+ if (!output.has_display_id && is_internal)
output.has_display_id = true;
if (info->crtc) {
@@ -317,7 +317,7 @@ RealOutputConfiguratorDelegate::InitOutputSnapshot(
}
std::string name(info->name);
- if (output.is_internal) {
+ if (is_internal) {
output.type = OUTPUT_TYPE_INTERNAL;
} else if (name.find(kOutputName_VGA) == 0) {
output.type = OUTPUT_TYPE_VGA;
@@ -597,7 +597,7 @@ void RealOutputConfiguratorDelegate::GetTouchscreens(
it != no_match_touchscreen.end();
it++) {
for (size_t i = 0; i < outputs->size(); i++) {
- if ((*outputs)[i].is_internal == false &&
+ if ((*outputs)[i].type != OUTPUT_TYPE_INTERNAL &&
(*outputs)[i].native_mode != None &&
(*outputs)[i].touch_device_id == None ) {
(*outputs)[i].touch_device_id = *it;
« no previous file with comments | « chromeos/display/output_configurator_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698