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

Side by Side Diff: ui/display/mojo/display_mode_struct_traits.cc

Issue 2646213002: Write mojom and StructTraits for DisplaySnapshot. (Closed)
Patch Set: Rebase. Created 3 years, 9 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
(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
OLDNEW
« no previous file with comments | « ui/display/mojo/display_mode_struct_traits.h ('k') | ui/display/mojo/display_snapshot_mojo.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698