Chromium Code Reviews| 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 #ifndef UI_DISPLAY_MOJO_DISPLAY_MODE_STRUCT_TRAITS_CC_ | |
|
kylechar
2017/02/09 15:05:53
Again, remove this.
thanhph1
2017/02/10 19:54:32
Done.
| |
| 6 #define UI_DISPLAY_MOJO_DISPLAY_MODE_STRUCT_TRAITS_CC_ | |
| 7 | |
| 8 #include "ui/display/mojo/display_mode_struct_traits.h" | |
|
kylechar
2017/02/09 15:05:53
Please read the style guide section on includes an
thanhph1
2017/02/10 19:54:31
I removed a duplicated include size.h
| |
| 9 #include "ui/gfx/geometry/mojo/geometry_struct_traits.h" | |
| 10 #include "ui/gfx/geometry/size.h" | |
| 11 | |
| 12 namespace mojo { | |
| 13 | |
| 14 // static | |
| 15 bool StructTraits<display::mojom::DisplayModeDataView, | |
| 16 std::unique_ptr<display::DisplayMode>>:: | |
| 17 Read(display::mojom::DisplayModeDataView data, | |
| 18 std::unique_ptr<display::DisplayMode>* out) { | |
| 19 gfx::Size size; | |
| 20 if (!data.ReadSize(&size)) | |
| 21 return false; | |
| 22 *out = base::MakeUnique<display::DisplayMode>(size, data.is_interlaced(), | |
| 23 data.refresh_rate()); | |
| 24 return true; | |
| 25 }; | |
| 26 | |
| 27 } // namespace mojo | |
| 28 | |
| 29 #endif // UI_DISPLAY_MOJO_DISPLAY_MODE_STRUCT_TRAITS_CC_ | |
| OLD | NEW |