| OLD | NEW |
| 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 java_object_.Reset(); | 106 java_object_.Reset(); |
| 106 } | 107 } |
| 107 | 108 |
| 108 SpellCheckerSessionBridge::SpellingRequest::SpellingRequest( | 109 SpellCheckerSessionBridge::SpellingRequest::SpellingRequest( |
| 109 int route_id, | 110 int route_id, |
| 110 int identifier, | 111 int identifier, |
| 111 const base::string16& text) | 112 const base::string16& text) |
| 112 : route_id(route_id), identifier(identifier), text(text) {} | 113 : route_id(route_id), identifier(identifier), text(text) {} |
| 113 | 114 |
| 114 SpellCheckerSessionBridge::SpellingRequest::~SpellingRequest() {} | 115 SpellCheckerSessionBridge::SpellingRequest::~SpellingRequest() {} |
| OLD | NEW |