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

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

Issue 2159283003: [WIP][DO NOT LAND] Componentize spellcheck Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 "chrome/renderer/spellchecker/spellcheck_language.h" 5 #include "components/spellcheck/renderer/spellcheck_language.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "chrome/renderer/spellchecker/spellcheck_worditerator.h" 10 #include "components/spellcheck/renderer/spellcheck_worditerator.h"
11 #include "chrome/renderer/spellchecker/spelling_engine.h" 11 #include "components/spellcheck/renderer/spelling_engine.h"
12 12
13 13
14 SpellcheckLanguage::SpellcheckLanguage() 14 SpellcheckLanguage::SpellcheckLanguage()
15 : platform_spelling_engine_(CreateNativeSpellingEngine()) { 15 : platform_spelling_engine_(CreateNativeSpellingEngine()) {
16 } 16 }
17 17
18 SpellcheckLanguage::~SpellcheckLanguage() { 18 SpellcheckLanguage::~SpellcheckLanguage() {
19 } 19 }
20 20
21 void SpellcheckLanguage::Init(base::File file, const std::string& language) { 21 void SpellcheckLanguage::Init(base::File file, const std::string& language) {
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 if (!platform_spelling_engine_->CheckSpelling(word, tag)) 142 if (!platform_spelling_engine_->CheckSpelling(word, tag))
143 return false; 143 return false;
144 } 144 }
145 return true; 145 return true;
146 } 146 }
147 147
148 bool SpellcheckLanguage::IsEnabled() { 148 bool SpellcheckLanguage::IsEnabled() {
149 DCHECK(platform_spelling_engine_.get()); 149 DCHECK(platform_spelling_engine_.get());
150 return platform_spelling_engine_->IsEnabled(); 150 return platform_spelling_engine_->IsEnabled();
151 } 151 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698