Add option to turn on/off auto correct word

This commit is contained in:
Cheng Zhao 2014-12-19 21:01:47 -08:00
parent f6c66e7ece
commit 90b2d12371
4 changed files with 20 additions and 9 deletions

View file

@ -18,8 +18,9 @@ namespace api {
class SpellCheckClient : public blink::WebSpellCheckClient {
public:
SpellCheckClient(v8::Isolate* isolate,
const std::string& language,
SpellCheckClient(const std::string& language,
bool auto_spell_correct_turned_on,
v8::Isolate* isolate,
v8::Handle<v8::Object> provider);
virtual ~SpellCheckClient();
@ -74,6 +75,8 @@ class SpellCheckClient : public blink::WebSpellCheckClient {
SpellcheckWordIterator text_iterator_;
SpellcheckWordIterator contraction_iterator_;
bool auto_spell_correct_turned_on_;
v8::Isolate* isolate_;
mate::ScopedPersistent<v8::Object> provider_;
mate::ScopedPersistent<v8::Function> spell_check_;