OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 // An object to store user feedback to spellcheck suggestions from spelling | 5 // An object to store user feedback to spellcheck suggestions from spelling |
6 // service. | 6 // service. |
7 // | 7 // |
8 // Stores feedback for the spelling service in |Misspelling| objects. Each | 8 // Stores feedback for the spelling service in |Misspelling| objects. Each |
9 // |Misspelling| object is identified by a |hash| and corresponds to a document | 9 // |Misspelling| object is identified by a |hash| and corresponds to a document |
10 // marker with the same |hash| identifier in the renderer. | 10 // marker with the same |hash| identifier in the renderer. |
11 | 11 |
12 #ifndef CHROME_BROWSER_SPELLCHECKER_FEEDBACK_H_ | 12 #ifndef CHROME_BROWSER_SPELLCHECKER_FEEDBACK_H_ |
13 #define CHROME_BROWSER_SPELLCHECKER_FEEDBACK_H_ | 13 #define CHROME_BROWSER_SPELLCHECKER_FEEDBACK_H_ |
14 | 14 |
15 #include <stddef.h> | 15 #include <stddef.h> |
16 #include <stdint.h> | 16 #include <stdint.h> |
17 | 17 |
18 #include <map> | 18 #include <map> |
19 #include <set> | 19 #include <set> |
20 #include <vector> | 20 #include <vector> |
21 | 21 |
22 #include "base/macros.h" | 22 #include "base/macros.h" |
23 #include "chrome/browser/spellchecker/misspelling.h" | 23 #include "components/spellcheck/browser/misspelling.h" |
24 | 24 |
25 namespace spellcheck { | 25 namespace spellcheck { |
26 | 26 |
27 // Stores user feedback to spellcheck suggestions. Sample usage: | 27 // Stores user feedback to spellcheck suggestions. Sample usage: |
28 // Feedback feedback; | 28 // Feedback feedback; |
29 // feedback.AddMisspelling(renderer_process_id, Misspelling( | 29 // feedback.AddMisspelling(renderer_process_id, Misspelling( |
30 // base::ASCIIToUTF16("Helllo world"), 0, 6, | 30 // base::ASCIIToUTF16("Helllo world"), 0, 6, |
31 // std::vector<base::string16>(), GenerateRandomHash())); | 31 // std::vector<base::string16>(), GenerateRandomHash())); |
32 // feedback.FinalizeRemovedMisspellings(renderer_process_id, | 32 // feedback.FinalizeRemovedMisspellings(renderer_process_id, |
33 // std::vector<uint32_t>()); | 33 // std::vector<uint32_t>()); |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 | 114 |
115 // A map of misspelled text to hashes that identify misspellings. | 115 // A map of misspelled text to hashes that identify misspellings. |
116 TextHashesMap text_; | 116 TextHashesMap text_; |
117 | 117 |
118 DISALLOW_COPY_AND_ASSIGN(Feedback); | 118 DISALLOW_COPY_AND_ASSIGN(Feedback); |
119 }; | 119 }; |
120 | 120 |
121 } // namespace spellcheck | 121 } // namespace spellcheck |
122 | 122 |
123 #endif // CHROME_BROWSER_SPELLCHECKER_FEEDBACK_H_ | 123 #endif // CHROME_BROWSER_SPELLCHECKER_FEEDBACK_H_ |
OLD | NEW |