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 | |
yosin_UTC9
2017/04/25 08:20:59
Could you add short description of this interface
| |
17 : public GarbageCollectedFinalized<DocumentMarkerList> { | |
18 public: | |
19 DocumentMarkerList(); | |
yosin_UTC9
2017/04/25 08:20:59
ctor should have protected accessibility. Since we
| |
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 // TODO(rlanday): remove this method from this interface once we have a | |
39 // Spelling/Grammar-specific marker list impl to put this on | |
40 virtual bool RemoveMarkersUnderWords(const String& node_text, | |
41 const Vector<String>& words) = 0; | |
42 | |
43 // Returns true if at least one marker is shifted or removed, false otherwise | |
44 virtual bool ShiftMarkers(unsigned offset, | |
45 unsigned old_length, | |
46 unsigned new_length) = 0; | |
47 | |
48 DEFINE_INLINE_VIRTUAL_TRACE() {} | |
49 DISALLOW_COPY_AND_ASSIGN(DocumentMarkerList); | |
yosin_UTC9
2017/04/25 08:20:59
DISALLOW_COPY_AND_ASSIGN(...) should have private
| |
50 }; | |
51 | |
52 } // namespace blink | |
53 | |
54 #endif // DocumentMarkerList_h | |
OLD | NEW |