Chromium Code Reviews| Index: third_party/WebKit/Source/core/editing/markers/SpellCheckMarkerList.h |
| diff --git a/third_party/WebKit/Source/core/editing/markers/SpellCheckMarkerList.h b/third_party/WebKit/Source/core/editing/markers/SpellCheckMarkerList.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..a65929db1477195c59f2ac7c18ca7513b82f9fd5 |
| --- /dev/null |
| +++ b/third_party/WebKit/Source/core/editing/markers/SpellCheckMarkerList.h |
| @@ -0,0 +1,40 @@ |
| +// 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 SpellCheckMarkerList_h |
| +#define SpellCheckMarkerList_h |
| + |
| +#include "core/editing/markers/EditingMarkerList.h" |
| + |
| +namespace blink { |
| + |
| +class Text; |
| + |
| +class CORE_EXPORT SpellCheckMarkerList : public EditingMarkerList { |
|
yosin_UTC9
2017/03/27 05:02:50
nit: Please mark this class |final|
|
| + public: |
| + explicit SpellCheckMarkerList(DocumentMarker::MarkerType); |
| + |
| + // DocumentMarkerList implementations |
| + DocumentMarker::MarkerType allowedMarkerType() const final; |
|
yosin_UTC9
2017/03/27 05:02:51
nit: interface implementations should be in |priva
rlanday
2017/03/27 21:59:24
Sorry, I don't understand what you mean here; thes
Xiaocheng
2017/03/27 22:08:24
In most cases, subclasses put overridden functions
|
| + bool isSpellCheckMarkerList() const final; |
| + void push_back(DocumentMarker*) final; |
| + |
| + // SpellCheckMarkerList-specific |
| + void removeMarkersForWords(const Text& textNode, const Vector<String>& words); |
| + |
| + private: |
| + DocumentMarker::MarkerType m_type; |
|
yosin_UTC9
2017/03/27 05:02:51
nit: s/DocumentMarker::MarkerType/const DocumentMa
|
| + |
| + DISALLOW_COPY_AND_ASSIGN(SpellCheckMarkerList); |
| +}; |
| + |
| +DEFINE_TYPE_CASTS(SpellCheckMarkerList, |
| + DocumentMarkerList, |
| + list, |
| + list->isSpellCheckMarkerList(), |
| + list.isSpellCheckMarkerList()); |
| + |
| +} // namespace blink |
| + |
| +#endif // SpellCheckMarkerList_h |