OLD | NEW |
(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 |
OLD | NEW |