| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef CHROME_RENDERER_SPELLCHECKER_SPELLCHECK_H_ | 5 #ifndef CHROME_RENDERER_SPELLCHECKER_SPELLCHECK_H_ |
| 6 #define CHROME_RENDERER_SPELLCHECKER_SPELLCHECK_H_ | 6 #define CHROME_RENDERER_SPELLCHECKER_SPELLCHECK_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 // Returns true if the spellchecker delegate checking to a system-provided | 64 // Returns true if the spellchecker delegate checking to a system-provided |
| 65 // checker on the browser process. | 65 // checker on the browser process. |
| 66 bool is_using_platform_spelling_engine() const { | 66 bool is_using_platform_spelling_engine() const { |
| 67 return is_using_platform_spelling_engine_; | 67 return is_using_platform_spelling_engine_; |
| 68 } | 68 } |
| 69 | 69 |
| 70 private: | 70 private: |
| 71 FRIEND_TEST(SpellCheckTest, GetAutoCorrectionWord_EN_US); | 71 FRIEND_TEST(SpellCheckTest, GetAutoCorrectionWord_EN_US); |
| 72 | 72 |
| 73 // RenderProcessObserver implementation: | 73 // RenderProcessObserver implementation: |
| 74 virtual bool OnControlMessageReceived(const IPC::Message& message); | 74 virtual bool OnControlMessageReceived(const IPC::Message& message) OVERRIDE; |
| 75 | 75 |
| 76 // Message handlers. | 76 // Message handlers. |
| 77 void OnInit(IPC::PlatformFileForTransit bdict_file, | 77 void OnInit(IPC::PlatformFileForTransit bdict_file, |
| 78 const std::vector<std::string>& custom_words, | 78 const std::vector<std::string>& custom_words, |
| 79 const std::string& language, | 79 const std::string& language, |
| 80 bool auto_spell_correct); | 80 bool auto_spell_correct); |
| 81 void OnWordAdded(const std::string& word); | 81 void OnWordAdded(const std::string& word); |
| 82 void OnEnableAutoSpellCorrect(bool enable); | 82 void OnEnableAutoSpellCorrect(bool enable); |
| 83 | 83 |
| 84 // Initializes the Hunspell dictionary, or does nothing if |hunspell_| is | 84 // Initializes the Hunspell dictionary, or does nothing if |hunspell_| is |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 // This flags whether we have ever been initialized, or have asked the browser | 140 // This flags whether we have ever been initialized, or have asked the browser |
| 141 // for a dictionary. The value indicates whether we should request a | 141 // for a dictionary. The value indicates whether we should request a |
| 142 // dictionary from the browser when the render view asks us to check the | 142 // dictionary from the browser when the render view asks us to check the |
| 143 // spelling of a word. | 143 // spelling of a word. |
| 144 bool initialized_; | 144 bool initialized_; |
| 145 | 145 |
| 146 DISALLOW_COPY_AND_ASSIGN(SpellCheck); | 146 DISALLOW_COPY_AND_ASSIGN(SpellCheck); |
| 147 }; | 147 }; |
| 148 | 148 |
| 149 #endif // CHROME_RENDERER_SPELLCHECKER_SPELLCHECK_H_ | 149 #endif // CHROME_RENDERER_SPELLCHECKER_SPELLCHECK_H_ |
| OLD | NEW |