| Index: chrome/renderer/spellchecker/platform_engine.cc
|
| diff --git a/chrome/renderer/spellchecker/cocoa_spelling_engine_mac.cc b/chrome/renderer/spellchecker/platform_engine.cc
|
| similarity index 61%
|
| copy from chrome/renderer/spellchecker/cocoa_spelling_engine_mac.cc
|
| copy to chrome/renderer/spellchecker/platform_engine.cc
|
| index 04e0b0b130f82fd1d3f479796b242dae7410fe78..9d200229693eeb31572c6a815a132ca38cb3f6f9 100644
|
| --- a/chrome/renderer/spellchecker/cocoa_spelling_engine_mac.cc
|
| +++ b/chrome/renderer/spellchecker/platform_engine.cc
|
| @@ -1,8 +1,8 @@
|
| -// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
| +// Copyright 2015 The Chromium Authors. All rights reserved.
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "chrome/renderer/spellchecker/cocoa_spelling_engine_mac.h"
|
| +#include "chrome/renderer/spellchecker/platform_engine.h"
|
|
|
| #include "chrome/common/spellcheck_messages.h"
|
| #include "content/public/renderer/render_thread.h"
|
| @@ -10,25 +10,25 @@
|
| using content::RenderThread;
|
|
|
| SpellingEngine* CreateNativeSpellingEngine() {
|
| - return new CocoaSpellingEngine();
|
| + return new PlatformSpellingEngine();
|
| }
|
|
|
| -void CocoaSpellingEngine::Init(base::File bdict_file) {
|
| +void PlatformSpellingEngine::Init(base::File bdict_file) {
|
| DCHECK(!bdict_file.IsValid());
|
| }
|
|
|
| -bool CocoaSpellingEngine::InitializeIfNeeded() {
|
| - return false; // We never need to initialize.
|
| +bool PlatformSpellingEngine::InitializeIfNeeded() {
|
| + return false;
|
| }
|
|
|
| -bool CocoaSpellingEngine::IsEnabled() {
|
| - return true; // OSX is always enabled.
|
| +bool PlatformSpellingEngine::IsEnabled() {
|
| + return true;
|
| }
|
|
|
| -// Synchronously query against NSSpellCheck.
|
| +// Synchronously query against the platform's spellchecker.
|
| // TODO(groby): We might want async support here, too. Ideally,
|
| // all engines share a similar path for async requests.
|
| -bool CocoaSpellingEngine::CheckSpelling(const base::string16& word_to_check,
|
| +bool PlatformSpellingEngine::CheckSpelling(const base::string16& word_to_check,
|
| int tag) {
|
| bool word_correct = false;
|
| RenderThread::Get()->Send(new SpellCheckHostMsg_CheckSpelling(
|
| @@ -36,10 +36,10 @@ bool CocoaSpellingEngine::CheckSpelling(const base::string16& word_to_check,
|
| return word_correct;
|
| }
|
|
|
| -// Synchronously query against NSSpellCheck.
|
| +// Synchronously query against platform's spellchecker.
|
| // TODO(groby): We might want async support here, too. Ideally,
|
| // all engines share a similar path for async requests.
|
| -void CocoaSpellingEngine::FillSuggestionList(
|
| +void PlatformSpellingEngine::FillSuggestionList(
|
| const base::string16& wrong_word,
|
| std::vector<base::string16>* optional_suggestions) {
|
| RenderThread::Get()->Send(new SpellCheckHostMsg_FillSuggestionList(
|
|
|