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

Side by Side Diff: services/prediction/proximity_info_factory.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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 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 #ifndef SERVICES_PREDICTION_PROXIMITY_INFO_FACTORY_H_
6 #define SERVICES_PREDICTION_PROXIMITY_INFO_FACTORY_H_
7
8 #include "mojo/services/prediction/public/interfaces/prediction.mojom.h"
9 #include "services/prediction/key_set.h"
10 #include "third_party/android_prediction/suggest/core/layout/proximity_info.h"
11
12 // NOTE: This class has been translated to C++ and modified from the Android
13 // Open Source Project. Specifically from some functions of the following file:
14 // https://android.googlesource.com/platform/packages/inputmethods/LatinIME/+/
15 // android-5.1.1_r8/java/src/com/android/inputmethod/keyboard/ProximityInfo.java
16
17 namespace prediction {
18
19 class ProximityInfoFactory {
20 public:
21 ProximityInfoFactory();
22 ~ProximityInfoFactory();
23
24 latinime::ProximityInfo* GetNativeProximityInfo();
25
26 private:
27 // Number of key widths from current touch point to search for nearest keys.
28 static const float SEARCH_DISTANCE;
29 static const float DEFAULT_TOUCH_POSITION_CORRECTION_RADIUS;
30
31 int SquaredDistanceToEdge(int x, int y, Key k);
32
33 int pgrid_width_;
34 int pgrid_height_;
35 int pgrid_size_;
36 int pcell_width_;
37 int pcell_height_;
38 int pkeyboard_min_width_;
39 int pkeyboard_height_;
40 int pmost_common_key_width_;
41 int pmost_common_key_height_;
42 std::string plocale_;
43 }; // class ProximityInfoFactory
44
45 } // namespace prediction
46
47 #endif // SERVICES_PREDICTION_PROXIMITY_INFO_FACTORY_H_
OLDNEW
« no previous file with comments | « services/prediction/prediction_service_impl.cc ('k') | services/prediction/proximity_info_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698