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

Side by Side Diff: components/spellcheck/browser/spellchecker_session_bridge_android.cc

Issue 2244083002: Componentize spellcheck [4]: spellcheck/browser and android java-side. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/spellchecker/spellchecker_session_bridge_android.h" 5 #include "components/spellcheck/browser/spellchecker_session_bridge_android.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/android/jni_array.h" 10 #include "base/android/jni_array.h"
11 #include "base/android/jni_string.h" 11 #include "base/android/jni_string.h"
12 #include "components/spellcheck/common/spellcheck_messages.h" 12 #include "components/spellcheck/common/spellcheck_messages.h"
13 #include "components/spellcheck/common/spellcheck_result.h" 13 #include "components/spellcheck/common/spellcheck_result.h"
14 #include "content/public/browser/render_process_host.h" 14 #include "content/public/browser/render_process_host.h"
15 #include "jni/SpellCheckerSessionBridge_jni.h" 15 #include "jni/SpellCheckerSessionBridge_jni.h"
16 16
17 using base::android::JavaParamRef; 17 using base::android::JavaParamRef;
18 18
19 SpellCheckerSessionBridge::SpellCheckerSessionBridge(int render_process_id) 19 SpellCheckerSessionBridge::SpellCheckerSessionBridge(int render_process_id)
20 : render_process_id_(render_process_id) {} 20 : render_process_id_(render_process_id),
21 java_object_initialization_failed_(false) {}
21 22
22 SpellCheckerSessionBridge::~SpellCheckerSessionBridge() {} 23 SpellCheckerSessionBridge::~SpellCheckerSessionBridge() {}
23 24
24 // static 25 // static
25 bool SpellCheckerSessionBridge::RegisterJNI(JNIEnv* env) { 26 bool SpellCheckerSessionBridge::RegisterJNI(JNIEnv* env) {
26 return RegisterNativesImpl(env); 27 return RegisterNativesImpl(env);
27 } 28 }
28 29
29 void SpellCheckerSessionBridge::RequestTextCheck(int route_id, 30 void SpellCheckerSessionBridge::RequestTextCheck(int route_id,
30 int identifier, 31 int identifier,
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 java_object_.Reset(); 104 java_object_.Reset();
104 } 105 }
105 106
106 SpellCheckerSessionBridge::SpellingRequest::SpellingRequest( 107 SpellCheckerSessionBridge::SpellingRequest::SpellingRequest(
107 int route_id, 108 int route_id,
108 int identifier, 109 int identifier,
109 const base::string16& text) 110 const base::string16& text)
110 : route_id(route_id), identifier(identifier), text(text) {} 111 : route_id(route_id), identifier(identifier), text(text) {}
111 112
112 SpellCheckerSessionBridge::SpellingRequest::~SpellingRequest() {} 113 SpellCheckerSessionBridge::SpellingRequest::~SpellingRequest() {}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698