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

Unified Diff: services/prediction/touch_position_correction.h

Issue 1247903003: Add spellcheck and word suggestion to the prediction service (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: format README and CHROMIUM.diff Created 5 years, 4 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 | « services/prediction/res/main_en.dict.sha1 ('k') | services/prediction/touch_position_correction.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/prediction/touch_position_correction.h
diff --git a/services/prediction/touch_position_correction.h b/services/prediction/touch_position_correction.h
new file mode 100644
index 0000000000000000000000000000000000000000..1ccf88066d499c7a3815aabfe7da7aca47b47da4
--- /dev/null
+++ b/services/prediction/touch_position_correction.h
@@ -0,0 +1,41 @@
+// Copyright 2015 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.
+
+#ifndef SERVICES_PREDICTION_TOUCH_POSITION_CORRECTION_H_
+#define SERVICES_PREDICTION_TOUCH_POSITION_CORRECTION_H_
+
+#include "mojo/services/prediction/public/interfaces/prediction.mojom.h"
+
+// NOTE: This class has been translated to C++ and modified from the Android
+// Open Source Project. Specifically from some functions of the following file:
+// https://android.googlesource.com/platform/packages/inputmethods/LatinIME/+/
+// android-5.1.1_r8/java/src/com/android/inputmethod/keyboard/internal/
+// TouchPositionCorrection.java
+
+namespace prediction {
+
+class TouchPositionCorrection {
+ public:
+ TouchPositionCorrection();
+ ~TouchPositionCorrection();
+
+ bool IsValid();
+
+ int GetRows();
+ float GetX(const int row);
+ float GetY(const int row);
+ float GetRadius(const int row);
+
+ private:
+ static const int TOUCH_POSITION_CORRECTION_RECORD_SIZE;
+
+ bool enabled_;
+ float xs_[3];
+ float ys_[3];
+ float radii_[3];
+}; // class TouchPositionCorrection
+
+} // namespace prediction
+
+#endif // SERVICES_PREDICTION_TOUCH_POSITION_CORRECTION_H_
« no previous file with comments | « services/prediction/res/main_en.dict.sha1 ('k') | services/prediction/touch_position_correction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698