Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(486)

Side by Side Diff: third_party/WebKit/Source/core/editing/markers/DocumentMarkerList.h

Issue 2805553003: DocumentMarkerList refactor as an interface (Closed)
Patch Set: Rebase on renaming patch, respond to comments Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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/editing/markers/DocumentMarker.h"
9 #include "platform/heap/Handle.h"
10
11 namespace blink {
12
13 class CORE_EXPORT DocumentMarkerList
14 : public GarbageCollectedFinalized<DocumentMarkerList> {
15 public:
16 DocumentMarkerList();
17
18 virtual ~DocumentMarkerList();
19
20 virtual DocumentMarker::MarkerType GetAllowedMarkerType() const = 0;
21
22 virtual bool Empty() const = 0;
23 virtual DocumentMarker* At(size_t index) = 0;
24
25 virtual void Add(DocumentMarker*) = 0;
26 virtual void Clear() = 0;
27
28 virtual void AppendMarkersToInputList(DocumentMarkerVector* list) const = 0;
29
30 enum class DidMoveMarkerOrNot { kDidNotMoveMarker, kDidMoveMarker };
31 virtual DidMoveMarkerOrNot MoveMarkers(int length,
32 DocumentMarkerList* dst_list) = 0;
33
34 enum class DidRemoveMarkerOrNot { kDidNotRemoveMarker, kDidRemoveMarker };
35 virtual DidRemoveMarkerOrNot RemoveMarkers(unsigned start_offset,
36 int length) = 0;
37
38 enum class DidShiftMarkerOrNot { kDidNotShiftMarker, kDidShiftMarker };
39 virtual DidShiftMarkerOrNot ShiftMarkers(unsigned offset,
40 unsigned old_length,
41 unsigned new_length) = 0;
42
43 DEFINE_INLINE_VIRTUAL_TRACE() {}
44 DISALLOW_COPY_AND_ASSIGN(DocumentMarkerList);
45 };
46
47 } // namespace blink
48
49 #endif // DocumentMarkerList_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698