| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "ui/display/mojo/display_mode_struct_traits.h" |
| 6 |
| 7 #include "ui/gfx/geometry/mojo/geometry_struct_traits.h" |
| 8 |
| 9 namespace mojo { |
| 10 |
| 11 // static |
| 12 bool StructTraits<display::mojom::DisplayModeDataView, |
| 13 std::unique_ptr<display::DisplayMode>>:: |
| 14 Read(display::mojom::DisplayModeDataView data, |
| 15 std::unique_ptr<display::DisplayMode>* out) { |
| 16 gfx::Size size; |
| 17 if (!data.ReadSize(&size)) |
| 18 return false; |
| 19 *out = base::MakeUnique<display::DisplayMode>(size, data.is_interlaced(), |
| 20 data.refresh_rate()); |
| 21 return true; |
| 22 }; |
| 23 |
| 24 } // namespace mojo |
| OLD | NEW |