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 DocumentMarkerList_h | |
6 #define DocumentMarkerList_h | |
7 | |
8 #include "core/CoreExport.h" | |
9 #include "platform/heap/Handle.h" | |
10 | |
11 namespace blink { | |
12 | |
13 class DocumentMarker; | |
14 class RenderedDocumentMarker; | |
15 | |
16 class CORE_EXPORT DocumentMarkerList | |
17 : public GarbageCollectedFinalized<DocumentMarkerList> { | |
18 public: | |
19 DocumentMarkerList(); | |
20 | |
21 virtual ~DocumentMarkerList(); | |
22 | |
23 virtual bool IsEmpty() const = 0; | |
24 | |
25 virtual void Add(DocumentMarker*) = 0; | |
26 virtual void Clear() = 0; | |
27 | |
28 virtual const HeapVector<Member<RenderedDocumentMarker>>& GetMarkers() | |
29 const = 0; | |
30 | |
31 // Returns true if at least one marker is copied, false otherwise | |
32 virtual bool MoveMarkers(int length, DocumentMarkerList* dst_list) = 0; | |
33 | |
34 // Returns true if at least one marker is removed, false otherwise | |
35 virtual bool RemoveMarkers(unsigned start_offset, int length) = 0; | |
36 | |
37 // Returns true if a marker was removed, false otherwise. | |
38 virtual bool RemoveMarkersUnderWords(const String& node_text, | |
yosin_UTC9
2017/04/24 04:18:56
We don't need to have |RemoveMarkersUnderWords()|
Xiaocheng
2017/04/24 15:13:33
In the design that we agreed, DMLEditor is for cod
| |
39 const Vector<String>& words) = 0; | |
40 | |
41 // Returns true if at least one marker is shifted or removed, false otherwise | |
42 virtual bool ShiftMarkers(unsigned offset, | |
43 unsigned old_length, | |
44 unsigned new_length) = 0; | |
45 | |
46 DEFINE_INLINE_VIRTUAL_TRACE() {} | |
47 DISALLOW_COPY_AND_ASSIGN(DocumentMarkerList); | |
48 }; | |
49 | |
50 } // namespace blink | |
51 | |
52 #endif // DocumentMarkerList_h | |
OLD | NEW |