| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_COMMON_SPELLCHECK_RESULT_H_ |
| 6 #define CHROME_COMMON_SPELLCHECK_RESULT_H_ |
| 7 #pragma once |
| 8 |
| 9 #include "base/string16.h" |
| 10 |
| 11 // This class mirrors WebKit::WebTextCheckingResult which holds a |
| 12 // misspelled range inside the checked text. It also contains a |
| 13 // possible replacement of the misspelling if it is available. |
| 14 // |
| 15 // Although SpellCheckResult::Type defines various values Chromium |
| 16 // only uses the |Spelling| type. otehr values are just reflecting the |
| 17 // enum definition in the original WebKit class. |
| 18 // |
| 19 struct SpellCheckResult { |
| 20 enum Type { |
| 21 SPELLING = 1 << 1, |
| 22 GRAMMAR = 1 << 2, |
| 23 LINK = 1 << 5, |
| 24 QUOTE = 1 << 6, |
| 25 DASH = 1 << 7, |
| 26 REPLACEMENT = 1 << 8, |
| 27 CORRECTION = 1 << 9, |
| 28 SHOWCORRECTIONPANEL = 1 << 10 |
| 29 }; |
| 30 |
| 31 explicit SpellCheckResult( |
| 32 Type t = SPELLING, |
| 33 int loc = 0, |
| 34 int len = 0, |
| 35 const string16& rep = string16()) |
| 36 : type(t), location(loc), length(len), replacement(rep) { |
| 37 } |
| 38 |
| 39 Type type; |
| 40 int location; |
| 41 int length; |
| 42 string16 replacement; |
| 43 }; |
| 44 |
| 45 #endif // CHROME_COMMON_SPELLCHECK_RESULT_H_ |
| OLD | NEW |