| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/mojo/display_struct_traits.h" | 5 #include "ui/display/mojo/display_struct_traits.h" |
| 6 | 6 |
| 7 namespace mojo { | 7 namespace mojo { |
| 8 | 8 |
| 9 display::mojom::Rotation | 9 display::mojom::Rotation |
| 10 EnumTraits<display::mojom::Rotation, display::Display::Rotation>::ToMojom( | 10 EnumTraits<display::mojom::Rotation, display::Display::Rotation>::ToMojom( |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 } | 78 } |
| 79 | 79 |
| 80 bool StructTraits<display::mojom::DisplayDataView, display::Display>::Read( | 80 bool StructTraits<display::mojom::DisplayDataView, display::Display>::Read( |
| 81 display::mojom::DisplayDataView data, | 81 display::mojom::DisplayDataView data, |
| 82 display::Display* out) { | 82 display::Display* out) { |
| 83 out->set_id(data.id()); | 83 out->set_id(data.id()); |
| 84 | 84 |
| 85 if (!data.ReadBounds(&out->bounds_)) | 85 if (!data.ReadBounds(&out->bounds_)) |
| 86 return false; | 86 return false; |
| 87 | 87 |
| 88 if (!data.ReadSizeInPixels(&out->size_in_pixels_)) |
| 89 return false; |
| 90 |
| 88 if (!data.ReadWorkArea(&out->work_area_)) | 91 if (!data.ReadWorkArea(&out->work_area_)) |
| 89 return false; | 92 return false; |
| 90 | 93 |
| 91 out->set_device_scale_factor(data.device_scale_factor()); | 94 out->set_device_scale_factor(data.device_scale_factor()); |
| 92 | 95 |
| 93 if (!data.ReadRotation(&out->rotation_)) | 96 if (!data.ReadRotation(&out->rotation_)) |
| 94 return false; | 97 return false; |
| 95 | 98 |
| 96 if (!data.ReadTouchSupport(&out->touch_support_)) | 99 if (!data.ReadTouchSupport(&out->touch_support_)) |
| 97 return false; | 100 return false; |
| 98 | 101 |
| 99 if (!data.ReadMaximumCursorSize(&out->maximum_cursor_size_)) | 102 if (!data.ReadMaximumCursorSize(&out->maximum_cursor_size_)) |
| 100 return false; | 103 return false; |
| 101 | 104 |
| 105 out->set_color_depth(data.color_depth()); |
| 106 out->set_depth_per_component(data.depth_per_component()); |
| 107 out->set_is_monochrome(data.is_monochrome()); |
| 108 |
| 102 return true; | 109 return true; |
| 103 } | 110 } |
| 104 | 111 |
| 105 } // namespace mojo | 112 } // namespace mojo |
| OLD | NEW |