Index: third_party/WebKit/Source/core/editing/markers/SpellCheckMarker.h |
diff --git a/third_party/WebKit/Source/core/editing/markers/SpellCheckMarker.h b/third_party/WebKit/Source/core/editing/markers/SpellCheckMarker.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..ef5f45a16629e5da65f1b1d8f0a3a53b4675b3b6 |
--- /dev/null |
+++ b/third_party/WebKit/Source/core/editing/markers/SpellCheckMarker.h |
@@ -0,0 +1,44 @@ |
+// Copyright 2017 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef SpellCheckMarker_h |
+#define SpellCheckMarker_h |
+ |
+#include "core/editing/markers/DocumentMarker.h" |
+ |
+namespace blink { |
+ |
+class CORE_EXPORT SpellCheckMarker final : public DocumentMarker { |
+ public: |
+ SpellCheckMarker(DocumentMarker::MarkerType, |
+ unsigned startOffset, |
+ unsigned endOffset, |
+ const String& description); |
+ |
+ // DocumentMarker implementations |
+ SpellCheckMarker* clone() const final; |
+ MarkerType type() const final; |
+ |
+ // SpellCheckMarker-specific |
+ const String& description() const; |
+ |
+ protected: |
+ SpellCheckMarker(const SpellCheckMarker&) = default; |
+ |
+ private: |
+ DocumentMarker::MarkerType m_type; |
+ String m_description; |
+}; |
+ |
+DEFINE_TYPE_CASTS(SpellCheckMarker, |
+ DocumentMarker, |
+ marker, |
+ marker->type() == DocumentMarker::Spelling || |
+ marker->type() == DocumentMarker::Grammar, |
+ marker.type() == DocumentMarker::Spelling || |
+ marker.type() == DocumentMarker::Grammar); |
+ |
+} // namespace blink |
+ |
+#endif // SpellCheckMarker_h |