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

Side by Side Diff: components/spellcheck/renderer/spellcheck.cc

Issue 2857353002: Convert Spellcheck host MessageFilter IPC to mojo (Closed)
Patch Set: Use MakeUnique for the MessageLoop in TestingSpellCheckProvider. Created 3 years, 7 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "components/spellcheck/renderer/spellcheck.h" 5 #include "components/spellcheck/renderer/spellcheck.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <algorithm> 9 #include <algorithm>
10 #include <utility> 10 #include <utility>
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 } 196 }
197 if (optional_suggestions->size() >= spellcheck::kMaxSuggestions) { 197 if (optional_suggestions->size() >= spellcheck::kMaxSuggestions) {
198 break; 198 break;
199 } 199 }
200 } 200 }
201 } 201 }
202 202
203 void SpellCheck::SpellCheckerRequest( 203 void SpellCheck::SpellCheckerRequest(
204 const service_manager::BindSourceInfo& source_info, 204 const service_manager::BindSourceInfo& source_info,
205 spellcheck::mojom::SpellCheckerRequest request) { 205 spellcheck::mojom::SpellCheckerRequest request) {
206 spellchecker_bindings_.AddBinding(this, std::move(request)); 206 bindings_.AddBinding(this, std::move(request));
207 } 207 }
208 208
209 void SpellCheck::Initialize( 209 void SpellCheck::Initialize(
210 std::vector<spellcheck::mojom::SpellCheckBDictLanguagePtr> dictionaries, 210 std::vector<spellcheck::mojom::SpellCheckBDictLanguagePtr> dictionaries,
211 const std::vector<std::string>& custom_words, 211 const std::vector<std::string>& custom_words,
212 bool enable) { 212 bool enable) {
213 languages_.clear(); 213 languages_.clear();
214 214
215 for (const auto& dictionary : dictionaries) 215 for (const auto& dictionary : dictionaries)
216 AddSpellcheckLanguage(std::move(dictionary->file), dictionary->language); 216 AddSpellcheckLanguage(std::move(dictionary->file), dictionary->language);
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 512
513 textcheck_results->Assign(results); 513 textcheck_results->Assign(results);
514 } 514 }
515 515
516 bool SpellCheck::IsSpellcheckEnabled() { 516 bool SpellCheck::IsSpellcheckEnabled() {
517 #if defined(OS_ANDROID) 517 #if defined(OS_ANDROID)
518 if (!spellcheck::IsAndroidSpellCheckFeatureEnabled()) return false; 518 if (!spellcheck::IsAndroidSpellCheckFeatureEnabled()) return false;
519 #endif 519 #endif
520 return spellcheck_enabled_; 520 return spellcheck_enabled_;
521 } 521 }
OLDNEW
« no previous file with comments | « components/spellcheck/renderer/spellcheck.h ('k') | components/spellcheck/renderer/spellcheck_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698