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 12 matching lines...) Expand all Loading... |
23 | 23 |
24 namespace file_util { | 24 namespace file_util { |
25 class MemoryMappedFile; | 25 class MemoryMappedFile; |
26 } | 26 } |
27 | 27 |
28 // TODO(morrita): Needs reorg with SpellCheckProvider. | 28 // TODO(morrita): Needs reorg with SpellCheckProvider. |
29 // See http://crbug.com/73699. | 29 // See http://crbug.com/73699. |
30 class SpellCheck : public RenderProcessObserver { | 30 class SpellCheck : public RenderProcessObserver { |
31 public: | 31 public: |
32 SpellCheck(); | 32 SpellCheck(); |
33 ~SpellCheck(); | 33 virtual ~SpellCheck(); |
34 | 34 |
35 void Init(base::PlatformFile file, | 35 void Init(base::PlatformFile file, |
36 const std::vector<std::string>& custom_words, | 36 const std::vector<std::string>& custom_words, |
37 const std::string& language); | 37 const std::string& language); |
38 | 38 |
39 // SpellCheck a word. | 39 // SpellCheck a word. |
40 // Returns true if spelled correctly, false otherwise. | 40 // Returns true if spelled correctly, false otherwise. |
41 // If the spellchecker failed to initialize, always returns true. | 41 // If the spellchecker failed to initialize, always returns true. |
42 // The |tag| parameter should either be a unique identifier for the document | 42 // The |tag| parameter should either be a unique identifier for the document |
43 // that the word came from (if the current platform requires it), or 0. | 43 // that the word came from (if the current platform requires it), or 0. |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 // This flags whether we have ever been initialized, or have asked the browser | 132 // This flags whether we have ever been initialized, or have asked the browser |
133 // for a dictionary. The value indicates whether we should request a | 133 // for a dictionary. The value indicates whether we should request a |
134 // dictionary from the browser when the render view asks us to check the | 134 // dictionary from the browser when the render view asks us to check the |
135 // spelling of a word. | 135 // spelling of a word. |
136 bool initialized_; | 136 bool initialized_; |
137 | 137 |
138 DISALLOW_COPY_AND_ASSIGN(SpellCheck); | 138 DISALLOW_COPY_AND_ASSIGN(SpellCheck); |
139 }; | 139 }; |
140 | 140 |
141 #endif // CHROME_RENDERER_SPELLCHECKER_SPELLCHECK_H_ | 141 #endif // CHROME_RENDERER_SPELLCHECKER_SPELLCHECK_H_ |
OLD | NEW |