Index: cc/input/layer_selection_bound.cc |
diff --git a/cc/input/layer_selection_bound.cc b/cc/input/layer_selection_bound.cc |
index 7abd9e000030aaf403063634d1ae0ef4985a8c89..a5146dcbbaa9487c08de378e31f1245fc6bf631a 100644 |
--- a/cc/input/layer_selection_bound.cc |
+++ b/cc/input/layer_selection_bound.cc |
@@ -77,4 +77,20 @@ void LayerSelectionBound::FromProtobuf( |
layer_id = proto.layer_id(); |
} |
+void LayerSelectionToProtobuf(const LayerSelection& selection, |
+ proto::LayerSelection* proto) { |
+ selection.start.ToProtobuf(proto->mutable_start()); |
+ selection.end.ToProtobuf(proto->mutable_end()); |
+ proto->set_is_editable(selection.is_editable); |
+ proto->set_is_empty_text_form_control(selection.is_empty_text_form_control); |
+} |
+ |
+void LayerSelectionFromProtobuf(LayerSelection* selection, |
+ const proto::LayerSelection& proto) { |
+ selection->start.FromProtobuf(proto.start()); |
+ selection->end.FromProtobuf(proto.end()); |
+ selection->is_editable = proto.is_editable(); |
+ selection->is_empty_text_form_control = proto.is_empty_text_form_control(); |
+} |
+ |
} // namespace cc |