Removing flow to demote App Launcher to App Host, so app_host.exe can be deleted...
[chromium-blink-merge.git] / chrome / common / spellcheck_result.h
blobab34410cdb015bb47f46d09f1234b1bcfc933c83
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.
5 #ifndef CHROME_COMMON_SPELLCHECK_RESULT_H_
6 #define CHROME_COMMON_SPELLCHECK_RESULT_H_
8 #include "base/string16.h"
10 // This class mirrors WebKit::WebTextCheckingResult which holds a
11 // misspelled range inside the checked text. It also contains a
12 // possible replacement of the misspelling if it is available.
14 // Although SpellCheckResult::Type defines various values Chromium
15 // only uses the |Spelling| type. Other values are just reflecting the
16 // enum definition in the original WebKit class.
18 struct SpellCheckResult {
19 enum Type {
20 SPELLING = 1 << 1,
21 GRAMMAR = 1 << 2,
22 LINK = 1 << 5,
23 QUOTE = 1 << 6,
24 DASH = 1 << 7,
25 REPLACEMENT = 1 << 8,
26 CORRECTION = 1 << 9,
27 SHOWCORRECTIONPANEL = 1 << 10
30 explicit SpellCheckResult(
31 Type t = SPELLING,
32 int loc = 0,
33 int len = 0,
34 const string16& rep = string16())
35 : type(t), location(loc), length(len), replacement(rep) {
38 Type type;
39 int location;
40 int length;
41 string16 replacement;
44 #endif // CHROME_COMMON_SPELLCHECK_RESULT_H_