OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "core/editing/markers/ActiveSuggestionMarkerListImpl.h" | 5 #include "core/editing/markers/ActiveSuggestionMarkerListImpl.h" |
6 | 6 |
7 #include "core/editing/markers/DocumentMarkerListEditor.h" | 7 #include "core/editing/markers/DocumentMarkerListEditor.h" |
8 | 8 |
9 namespace blink { | 9 namespace blink { |
10 | 10 |
(...skipping 12 matching lines...) Expand all Loading... |
23 | 23 |
24 void ActiveSuggestionMarkerListImpl::Clear() { | 24 void ActiveSuggestionMarkerListImpl::Clear() { |
25 markers_.clear(); | 25 markers_.clear(); |
26 } | 26 } |
27 | 27 |
28 const HeapVector<Member<DocumentMarker>>& | 28 const HeapVector<Member<DocumentMarker>>& |
29 ActiveSuggestionMarkerListImpl::GetMarkers() const { | 29 ActiveSuggestionMarkerListImpl::GetMarkers() const { |
30 return markers_; | 30 return markers_; |
31 } | 31 } |
32 | 32 |
| 33 HeapVector<Member<DocumentMarker>> |
| 34 ActiveSuggestionMarkerListImpl::MarkersIntersectingRange( |
| 35 unsigned start_offset, |
| 36 unsigned end_offset) const { |
| 37 return DocumentMarkerListEditor::MarkersIntersectingRange( |
| 38 markers_, start_offset, end_offset); |
| 39 } |
| 40 |
33 bool ActiveSuggestionMarkerListImpl::MoveMarkers( | 41 bool ActiveSuggestionMarkerListImpl::MoveMarkers( |
34 int length, | 42 int length, |
35 DocumentMarkerList* dst_markers_) { | 43 DocumentMarkerList* dst_markers_) { |
36 return DocumentMarkerListEditor::MoveMarkers(&markers_, length, dst_markers_); | 44 return DocumentMarkerListEditor::MoveMarkers(&markers_, length, dst_markers_); |
37 } | 45 } |
38 | 46 |
39 bool ActiveSuggestionMarkerListImpl::RemoveMarkers(unsigned start_offset, | 47 bool ActiveSuggestionMarkerListImpl::RemoveMarkers(unsigned start_offset, |
40 int length) { | 48 int length) { |
41 return DocumentMarkerListEditor::RemoveMarkers(&markers_, start_offset, | 49 return DocumentMarkerListEditor::RemoveMarkers(&markers_, start_offset, |
42 length); | 50 length); |
43 } | 51 } |
44 | 52 |
45 bool ActiveSuggestionMarkerListImpl::ShiftMarkers(unsigned offset, | 53 bool ActiveSuggestionMarkerListImpl::ShiftMarkers(unsigned offset, |
46 unsigned old_length, | 54 unsigned old_length, |
47 unsigned new_length) { | 55 unsigned new_length) { |
48 return DocumentMarkerListEditor::ShiftMarkersContentIndependent( | 56 return DocumentMarkerListEditor::ShiftMarkersContentIndependent( |
49 &markers_, offset, old_length, new_length); | 57 &markers_, offset, old_length, new_length); |
50 } | 58 } |
51 | 59 |
52 DEFINE_TRACE(ActiveSuggestionMarkerListImpl) { | 60 DEFINE_TRACE(ActiveSuggestionMarkerListImpl) { |
53 visitor->Trace(markers_); | 61 visitor->Trace(markers_); |
54 DocumentMarkerList::Trace(visitor); | 62 DocumentMarkerList::Trace(visitor); |
55 } | 63 } |
56 | 64 |
57 } // namespace blink | 65 } // namespace blink |
OLD | NEW |