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

Side by Side Diff: ui/display/mojo/display_snapshot_mojo_struct_traits.h

Issue 2857033002: Remove DisplayStructTraitsTest interface. (Closed)
Patch Set: More cleanup. Created 3 years, 7 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 unified diff | Download patch
OLDNEW
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"
yzshen1 2017/05/03 16:39:46 I thought keeping these includes in the .cc file s
kylechar 2017/05/03 17:18:55 There are errors in the display_unittests target l
yzshen1 2017/05/03 17:22:03 Ah, right. Because the serialization is done outsi
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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698