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

Side by Side Diff: services/ui/public/interfaces/display/display_struct_traits.cc

Issue 2253293002: Mojo C++ bindings: change the first template parameter of StructTraits and UnionTraits. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@91_extra
Patch Set: rebase Created 4 years, 3 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #include "services/ui/public/interfaces/display/display_struct_traits.h" 5 #include "services/ui/public/interfaces/display/display_struct_traits.h"
6 6
7 #include "ui/gfx/geometry/mojo/geometry_struct_traits.h" 7 #include "ui/gfx/geometry/mojo/geometry_struct_traits.h"
8 8
9 namespace mojo { 9 namespace mojo {
10 10
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 *out = display::Display::TOUCH_SUPPORT_AVAILABLE; 72 *out = display::Display::TOUCH_SUPPORT_AVAILABLE;
73 return true; 73 return true;
74 case display::mojom::TouchSupport::UNAVAILABLE: 74 case display::mojom::TouchSupport::UNAVAILABLE:
75 *out = display::Display::TOUCH_SUPPORT_UNAVAILABLE; 75 *out = display::Display::TOUCH_SUPPORT_UNAVAILABLE;
76 return true; 76 return true;
77 } 77 }
78 NOTREACHED(); 78 NOTREACHED();
79 return display::Display::TOUCH_SUPPORT_UNKNOWN; 79 return display::Display::TOUCH_SUPPORT_UNKNOWN;
80 } 80 }
81 81
82 bool StructTraits<display::mojom::Display, display::Display>::Read( 82 bool StructTraits<display::mojom::DisplayDataView, display::Display>::Read(
83 display::mojom::DisplayDataView data, 83 display::mojom::DisplayDataView data,
84 display::Display* out) { 84 display::Display* out) {
85 out->set_id(data.id()); 85 out->set_id(data.id());
86 86
87 if (!data.ReadBounds(&out->bounds_)) 87 if (!data.ReadBounds(&out->bounds_))
88 return false; 88 return false;
89 89
90 if (!data.ReadWorkArea(&out->work_area_)) 90 if (!data.ReadWorkArea(&out->work_area_))
91 return false; 91 return false;
92 92
93 out->set_device_scale_factor(data.device_scale_factor()); 93 out->set_device_scale_factor(data.device_scale_factor());
94 94
95 if (!data.ReadRotation(&out->rotation_)) 95 if (!data.ReadRotation(&out->rotation_))
96 return false; 96 return false;
97 97
98 if (!data.ReadTouchSupport(&out->touch_support_)) 98 if (!data.ReadTouchSupport(&out->touch_support_))
99 return false; 99 return false;
100 100
101 if (!data.ReadMaximumCursorSize(&out->maximum_cursor_size_)) 101 if (!data.ReadMaximumCursorSize(&out->maximum_cursor_size_))
102 return false; 102 return false;
103 103
104 return true; 104 return true;
105 } 105 }
106 106
107 } // namespace mojo 107 } // namespace mojo
OLDNEW
« no previous file with comments | « services/ui/public/interfaces/display/display_struct_traits.h ('k') | skia/public/interfaces/bitmap_array_struct_traits.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698