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

Side by Side Diff: third_party/WebKit/Source/core/editing/markers/SpellCheckMarker.h

Issue 2911723002: [DMC #24] Add SpellingMarker and GrammarMarker (subclasses of DocumentMarker) (Closed)
Patch Set: Add IsSpellCheckMarker() tests Created 3 years, 6 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
OLDNEW
(Empty)
1 // Copyright 2017 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 SpellCheckMarker_h
6 #define SpellCheckMarker_h
7
8 #include "core/editing/markers/DocumentMarker.h"
9
10 namespace blink {
11
12 // A subclass of DocumentMarker used to implement functionality shared between
13 // spelling and grammar markers. These two marker types both store a
14 // description string that can contain suggested replacements for a misspelling
15 // or grammar error.
16 class CORE_EXPORT SpellCheckMarker : public DocumentMarker {
17 public:
18 SpellCheckMarker(DocumentMarker::MarkerType,
19 unsigned start_offset,
20 unsigned end_offset,
21 const String& description);
22
23 const String& Description() const { return description_; }
24
25 private:
26 const String description_;
27
28 DISALLOW_COPY_AND_ASSIGN(SpellCheckMarker);
29 };
30
31 bool CORE_EXPORT IsSpellCheckMarker(const DocumentMarker&);
32
33 DEFINE_TYPE_CASTS(SpellCheckMarker,
34 DocumentMarker,
35 marker,
36 IsSpellCheckMarker(*marker),
37 IsSpellCheckMarker(marker));
38
39 } // namespace blink
40
41 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698