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 class CORE_EXPORT SpellCheckMarker final : public DocumentMarker { |
| 13 public: |
| 14 SpellCheckMarker(DocumentMarker::MarkerType, |
| 15 unsigned startOffset, |
| 16 unsigned endOffset, |
| 17 const String& description); |
| 18 |
| 19 // DocumentMarker implementations |
| 20 SpellCheckMarker* clone() const final; |
| 21 |
| 22 MarkerType type() const final; |
| 23 |
| 24 const String& description() const final; |
| 25 |
| 26 protected: |
| 27 SpellCheckMarker(const SpellCheckMarker&) = default; |
| 28 |
| 29 private: |
| 30 DocumentMarker::MarkerType m_type; |
| 31 String m_description; |
| 32 }; |
| 33 |
| 34 DEFINE_TYPE_CASTS(SpellCheckMarker, |
| 35 DocumentMarker, |
| 36 marker, |
| 37 marker->type() == DocumentMarker::Spelling || |
| 38 marker->type() == DocumentMarker::Grammar, |
| 39 marker.type() == DocumentMarker::Spelling || |
| 40 marker.type() == DocumentMarker::Grammar); |
| 41 |
| 42 } // namespace blink |
| 43 |
| 44 #endif // SpellCheckMarker_h |
OLD | NEW |