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

Unified Diff: components/arc/ime/arc_ime_struct_traits.cc

Issue 2876693004: Implement GetTextFromRange(), GetTextRange() and GetSelectionRange() for ArcImeService. (Closed)
Patch Set: add TODOs in ime.mojom 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/arc/ime/arc_ime_struct_traits.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/arc/ime/arc_ime_struct_traits.cc
diff --git a/components/arc/ime/arc_ime_struct_traits.cc b/components/arc/ime/arc_ime_struct_traits.cc
new file mode 100644
index 0000000000000000000000000000000000000000..b3ca64ac47e260b1e0c66190f6f663f421555632
--- /dev/null
+++ b/components/arc/ime/arc_ime_struct_traits.cc
@@ -0,0 +1,27 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "components/arc/ime/arc_ime_struct_traits.h"
+
+namespace mojo {
+
+bool StructTraits<arc::mojom::CursorRectDataView, gfx::Rect>::Read(
+ arc::mojom::CursorRectDataView data,
+ gfx::Rect* out) {
+ out->set_x(data.left());
+ out->set_y(data.top());
+ out->set_width(data.right() - out->x());
+ out->set_height(data.bottom() - out->y());
+ return true;
+}
+
+bool StructTraits<arc::mojom::TextRangeDataView, gfx::Range>::Read(
+ arc::mojom::TextRangeDataView data,
+ gfx::Range* out) {
+ out->set_start(data.start());
+ out->set_end(data.end());
+ return true;
+}
+
+} // namespace mojo
« no previous file with comments | « components/arc/ime/arc_ime_struct_traits.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698