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

Side by Side Diff: chrome/renderer/spellchecker/cocoa_spelling_engine_mac.cc

Issue 209193002: Remove PlatformFile from spell checker (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Revert IsEnabled behavior Created 6 years, 9 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 | Annotate | Revision Log
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 "cocoa_spelling_engine_mac.h" 5 #include "cocoa_spelling_engine_mac.h"
6 6
7 #include "chrome/common/spellcheck_messages.h" 7 #include "chrome/common/spellcheck_messages.h"
8 #include "content/public/renderer/render_thread.h" 8 #include "content/public/renderer/render_thread.h"
9 9
10 using content::RenderThread; 10 using content::RenderThread;
11 11
12 SpellingEngine* CreateNativeSpellingEngine() { 12 SpellingEngine* CreateNativeSpellingEngine() {
13 return new CocoaSpellingEngine(); 13 return new CocoaSpellingEngine();
14 } 14 }
15 15
16 void CocoaSpellingEngine::Init(base::PlatformFile bdict_file) { 16 void CocoaSpellingEngine::Init(base::File bdict_file) {
17 DCHECK(bdict_file == base::kInvalidPlatformFileValue); 17 DCHECK(!bdict_file.IsValid());
18 } 18 }
19 19
20 bool CocoaSpellingEngine::InitializeIfNeeded() { 20 bool CocoaSpellingEngine::InitializeIfNeeded() {
21 return false; // We never need to initialize. 21 return false; // We never need to initialize.
22 } 22 }
23 23
24 bool CocoaSpellingEngine::IsEnabled() { 24 bool CocoaSpellingEngine::IsEnabled() {
25 return true; // OSX is always enabled. 25 return true; // OSX is always enabled.
26 } 26 }
27 27
(...skipping 10 matching lines...) Expand all
38 38
39 // Synchronously query against NSSpellCheck. 39 // Synchronously query against NSSpellCheck.
40 // TODO(groby): We might want async support here, too. Ideally, 40 // TODO(groby): We might want async support here, too. Ideally,
41 // all engines share a similar path for async requests. 41 // all engines share a similar path for async requests.
42 void CocoaSpellingEngine::FillSuggestionList( 42 void CocoaSpellingEngine::FillSuggestionList(
43 const base::string16& wrong_word, 43 const base::string16& wrong_word,
44 std::vector<base::string16>* optional_suggestions) { 44 std::vector<base::string16>* optional_suggestions) {
45 RenderThread::Get()->Send(new SpellCheckHostMsg_FillSuggestionList( 45 RenderThread::Get()->Send(new SpellCheckHostMsg_FillSuggestionList(
46 wrong_word, optional_suggestions)); 46 wrong_word, optional_suggestions));
47 } 47 }
OLDNEW
« no previous file with comments | « chrome/renderer/spellchecker/cocoa_spelling_engine_mac.h ('k') | chrome/renderer/spellchecker/hunspell_engine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698