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

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

Issue 2805553003: DocumentMarkerList refactor as an interface (Closed)
Patch Set: Respond to comments, fill in unimplemented methods 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 CompositionMarkerList_h
6 #define CompositionMarkerList_h
7
8 #include "core/editing/markers/DocumentMarkerList.h"
9
10 namespace blink {
11
12 class CORE_EXPORT CompositionMarkerList final : public DocumentMarkerList {
13 public:
14 CompositionMarkerList();
15
16 DocumentMarker::MarkerType allowedMarkerType() const final;
17
18 bool empty() const final;
19 DocumentMarker* at(size_t index) final;
20
21 void add(DocumentMarker*) final;
22 void clear() final;
23
24 void appendMarkersToInputList(DocumentMarkerVector* list) const;
25
26 DidCopyMarkerOrNot copyMarkers(unsigned startOffset,
27 int length,
28 DocumentMarkerList* dstList,
29 int delta) final;
30
31 DidRemoveMarkerOrNot removeMarkers(
32 unsigned startOffset,
33 int length,
34 bool shouldRemovePartiallyOverlappingMarkers) final;
35
36 DidShiftMarkerOrNot shiftMarkers(unsigned offset,
37 unsigned oldLength,
38 unsigned newLength) final;
39
40 DECLARE_VIRTUAL_TRACE();
41
42 private:
43 HeapVector<Member<DocumentMarker>> m_markers;
44
45 DISALLOW_COPY_AND_ASSIGN(CompositionMarkerList);
46 };
47
48 DEFINE_TYPE_CASTS(CompositionMarkerList,
49 DocumentMarkerList,
50 list,
51 list->allowedMarkerType() == DocumentMarker::Composition,
52 list.allowedMarkerType() == DocumentMarker::Composition);
53
54 } // namespace blink
55
56 #endif // CompositionMarkerList_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698