| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "services/ui/public/interfaces/ime/ime_struct_traits.h" |
| 6 |
| 7 #include "ui/gfx/range/mojo/range_struct_traits.h" |
| 8 |
| 9 namespace mojo { |
| 10 |
| 11 // static |
| 12 bool StructTraits<ui::mojom::CompositionUnderlineDataView, |
| 13 ui::CompositionUnderline>:: |
| 14 Read(ui::mojom::CompositionUnderlineDataView data, |
| 15 ui::CompositionUnderline* out) { |
| 16 if (data.is_null()) |
| 17 return false; |
| 18 out->start_offset = data.start_offset(); |
| 19 out->end_offset = data.end_offset(); |
| 20 out->color = data.color(); |
| 21 out->thick = data.thick(); |
| 22 out->background_color = data.background_color(); |
| 23 return true; |
| 24 } |
| 25 |
| 26 // static |
| 27 bool StructTraits<ui::mojom::CompositionTextDataView, ui::CompositionText>:: |
| 28 Read(ui::mojom::CompositionTextDataView data, ui::CompositionText* out) { |
| 29 return !data.is_null() && data.ReadText(&out->text) && |
| 30 data.ReadUnderlines(&out->underlines) && |
| 31 data.ReadSelection(&out->selection); |
| 32 } |
| 33 |
| 34 } // namespace mojo |
| OLD | NEW |