| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 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 | 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 #ifndef UI_DISPLAY_MOJO_DISPLAY_SNAPSHOT_MOJO_STRUCT_TRAITS_H_ | 5 #ifndef UI_DISPLAY_MOJO_DISPLAY_SNAPSHOT_MOJO_STRUCT_TRAITS_H_ |
| 6 #define UI_DISPLAY_MOJO_DISPLAY_SNAPSHOT_MOJO_STRUCT_TRAITS_H_ | 6 #define UI_DISPLAY_MOJO_DISPLAY_SNAPSHOT_MOJO_STRUCT_TRAITS_H_ |
| 7 | 7 |
| 8 #include "ipc/ipc_message_utils.h" |
| 9 #include "ui/display/mojo/display_constants_struct_traits.h" |
| 10 #include "ui/display/mojo/display_mode_struct_traits.h" |
| 8 #include "ui/display/mojo/display_snapshot_mojo.mojom.h" | 11 #include "ui/display/mojo/display_snapshot_mojo.mojom.h" |
| 9 #include "ui/display/types/display_mode.h" | 12 #include "ui/display/types/display_mode.h" |
| 10 #include "ui/display/types/display_snapshot_mojo.h" | 13 #include "ui/display/types/display_snapshot_mojo.h" |
| 14 #include "ui/gfx/geometry/mojo/geometry_struct_traits.h" |
| 11 | 15 |
| 12 namespace mojo { | 16 namespace mojo { |
| 13 | 17 |
| 14 template <> | 18 template <> |
| 15 struct StructTraits<display::mojom::DisplaySnapshotMojoDataView, | 19 struct StructTraits<display::mojom::DisplaySnapshotMojoDataView, |
| 16 std::unique_ptr<display::DisplaySnapshotMojo>> { | 20 std::unique_ptr<display::DisplaySnapshotMojo>> { |
| 17 static int64_t display_id( | 21 static int64_t display_id( |
| 18 const std::unique_ptr<display::DisplaySnapshotMojo>& snapshot) { | 22 const std::unique_ptr<display::DisplaySnapshotMojo>& snapshot) { |
| 19 return snapshot->display_id(); | 23 return snapshot->display_id(); |
| 20 } | 24 } |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 return snapshot->maximum_cursor_size(); | 97 return snapshot->maximum_cursor_size(); |
| 94 } | 98 } |
| 95 | 99 |
| 96 static bool Read(display::mojom::DisplaySnapshotMojoDataView data, | 100 static bool Read(display::mojom::DisplaySnapshotMojoDataView data, |
| 97 std::unique_ptr<display::DisplaySnapshotMojo>* out); | 101 std::unique_ptr<display::DisplaySnapshotMojo>* out); |
| 98 }; | 102 }; |
| 99 | 103 |
| 100 } // namespace mojo | 104 } // namespace mojo |
| 101 | 105 |
| 102 #endif // UI_DISPLAY_MOJO_DISPLAY_SNAPSHOT_MOJO_STRUCT_TRAITS_H_ | 106 #endif // UI_DISPLAY_MOJO_DISPLAY_SNAPSHOT_MOJO_STRUCT_TRAITS_H_ |
| OLD | NEW |