| 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> |
| 11 | 11 |
| 12 #include "base/gtest_prod_util.h" | 12 #include "base/gtest_prod_util.h" |
| 13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "base/platform_file.h" | 14 #include "base/platform_file.h" |
| 15 #include "base/string16.h" | 15 #include "base/string16.h" |
| 16 #include "base/time.h" | 16 #include "base/time.h" |
| 17 #include "chrome/renderer/spellchecker/spellcheck_worditerator.h" | 17 #include "chrome/renderer/spellchecker/spellcheck_worditerator.h" |
| 18 #include "content/renderer/render_process_observer.h" | 18 #include "content/public/renderer/render_process_observer.h" |
| 19 #include "ipc/ipc_platform_file.h" | 19 #include "ipc/ipc_platform_file.h" |
| 20 #include "unicode/uscript.h" | 20 #include "unicode/uscript.h" |
| 21 | 21 |
| 22 class Hunspell; | 22 class Hunspell; |
| 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 content::RenderProcessObserver { |
| 31 public: | 31 public: |
| 32 SpellCheck(); | 32 SpellCheck(); |
| 33 virtual ~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. |
| (...skipping 99 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 |