Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(133)

Side by Side Diff: chrome/common/spellcheck_result.h

Issue 9368052: Removed WebTextCheckingResult legacy API use. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Another trial... Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/common/spellcheck_messages.h ('k') | chrome/renderer/spellchecker/spellcheck.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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_
OLDNEW
« no previous file with comments | « chrome/common/spellcheck_messages.h ('k') | chrome/renderer/spellchecker/spellcheck.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698