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

Side by Side Diff: chrome/browser/spellchecker/spellchecker_session_bridge_android.h

Issue 1275813002: Implemented typo recognition in Chrome for Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@4_remove_mac_redundancies
Patch Set: Added a clarifying comment about Locale to the java file 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 CHROME_BROWSER_SPELLCHECKER_SPELLCHECKER_SESSION_BRIDGE_ANDROID_H_
6 #define CHROME_BROWSER_SPELLCHECKER_SPELLCHECKER_SESSION_BRIDGE_ANDROID_H_
7
8 #include "base/android/jni_android.h"
9 #include "base/android/jni_array.h"
newt (away) 2015/08/12 16:12:58 remove unneeded imports (jni_array.h and jni_strin
dylanking 2015/08/13 02:10:03 jni_array.h and jni_string.h are needed for the pa
10 #include "base/android/jni_string.h"
11
12 // Owned by the SpellCheckMessageFilterPlatform. This class is used to
13 // interface between the android message filter and the Java class of the
14 // same name. This class is sent text to be spellchecked from
15 // the message filter, then sends that text to the Java side via JNI to be
16 // spellchecked, and finally processes those results and sends them to the
17 // renderer.
18 class SpellCheckerSessionBridge {
19 public:
20 explicit SpellCheckerSessionBridge(int render_process_id);
21 ~SpellCheckerSessionBridge();
22 static bool RegisterSpellCheckerSessionBridge(JNIEnv* env);
please use gerrit instead 2015/08/12 17:05:54 Where do you call this?
please use gerrit instead 2015/08/12 17:05:54 Since you've put this function inside of a class,
newt (away) 2015/08/12 20:08:35 Or call it "RegisterJNI", which is clear and conci
dylanking 2015/08/13 02:10:03 There's some information about this here, but I'm
23
24 // Receives text to be checked from the message filter and sends it to Java
25 // to be spellchecked.
26 void RequestTextCheck(int route_id,
27 int identifier,
28 const base::string16& text);
29
30 // Receives information from Java side about the typos in a given string
31 // of text, processes these and sends them to the renderer.
32 void ProcessSpellCheckResults(JNIEnv* env,
33 jobject jobj,
34 jint route_id,
35 jint identifier,
36 jstring text,
37 jintArray offsetArray,
please use gerrit instead 2015/08/12 17:05:54 C++ parameters should_use_underscores_in_names.
dylanking 2015/08/13 02:10:03 Thanks, done.
38 jintArray lengthArray);
39
40 private:
41 int render_process_id_;
42 base::android::ScopedJavaGlobalRef<jobject> java_object_;
43
44 DISALLOW_COPY_AND_ASSIGN(SpellCheckerSessionBridge);
45 };
46
47 #endif // CHROME_BROWSER_SPELLCHECKER_SPELLCHECKER_SESSION_BRIDGE_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698