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 TextMatchMarkerList_h |
| 6 #define TextMatchMarkerList_h |
| 7 |
| 8 #include "core/editing/markers/DocumentMarkerList.h" |
| 9 |
| 10 #include "core/editing/markers/RenderedTextMatchMarker.h" |
| 11 |
| 12 namespace blink { |
| 13 |
| 14 class DocumentMarker; |
| 15 |
| 16 class TextMatchMarkerList : public DocumentMarkerList { |
| 17 WTF_MAKE_NONCOPYABLE(TextMatchMarkerList); |
| 18 |
| 19 public: |
| 20 explicit TextMatchMarkerList(DocumentMarkerController*); |
| 21 |
| 22 // DocumentMarkerList implementations |
| 23 DocumentMarker::MarkerType allowedMarkerType() const final; |
| 24 |
| 25 RenderedTextMatchMarker* at(size_t index) override; |
| 26 |
| 27 void clear() final; |
| 28 |
| 29 bool copyMarkers(unsigned startOffset, |
| 30 int length, |
| 31 Node* dstNode, |
| 32 int delta) const; |
| 33 void removeMarkers(unsigned startOffset, |
| 34 int length, |
| 35 bool shouldRemovePartiallyOverlappingMarkers, |
| 36 bool* didRemoveMarker) final; |
| 37 bool shiftMarkers(unsigned startOffset, |
| 38 unsigned oldLength, |
| 39 unsigned newLength) final; |
| 40 |
| 41 // TextMatchMarkerList-specific methods |
| 42 void push_back(DocumentMarker*); |
| 43 |
| 44 bool setTextMatchMarkersActive(unsigned startOffset, |
| 45 unsigned endOffset, |
| 46 bool active); |
| 47 |
| 48 DECLARE_VIRTUAL_TRACE(); |
| 49 }; |
| 50 |
| 51 } // namespace blink |
| 52 |
| 53 #endif // TextMatchMarkerList_h |
OLD | NEW |