Index: third_party/WebKit/Source/core/editing/markers/CompositionMarkerList.h |
diff --git a/third_party/WebKit/Source/core/editing/markers/CompositionMarkerList.h b/third_party/WebKit/Source/core/editing/markers/CompositionMarkerList.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..670bd8972f4257c3620ebd5fe29512932114d8ba |
--- /dev/null |
+++ b/third_party/WebKit/Source/core/editing/markers/CompositionMarkerList.h |
@@ -0,0 +1,51 @@ |
+// Moveright 2017 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CompositionMarkerList_h |
+#define CompositionMarkerList_h |
+ |
+#include "core/editing/markers/DocumentMarkerList.h" |
+ |
+namespace blink { |
+ |
+class CORE_EXPORT CompositionMarkerList final : public DocumentMarkerList { |
+ public: |
+ CompositionMarkerList(); |
+ |
+ DocumentMarker::MarkerType GetAllowedMarkerType() const final; |
+ |
+ bool Empty() const final; |
+ DocumentMarker* At(size_t index) final; |
+ |
+ void Add(DocumentMarker*) final; |
+ void Clear() final; |
+ |
+ void AppendMarkersToInputList(DocumentMarkerVector* list) const; |
+ |
+ DidMoveMarkerOrNot MoveMarkers(int length, |
+ DocumentMarkerList* dst_list) final; |
+ |
+ DidRemoveMarkerOrNot RemoveMarkers(unsigned start_offset, int length); |
+ |
+ DidShiftMarkerOrNot ShiftMarkers(unsigned offset, |
+ unsigned old_length, |
+ unsigned new_length) final; |
+ |
+ DECLARE_VIRTUAL_TRACE(); |
+ |
+ private: |
+ HeapVector<Member<DocumentMarker>> markers_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(CompositionMarkerList); |
+}; |
+ |
+DEFINE_TYPE_CASTS(CompositionMarkerList, |
+ DocumentMarkerList, |
+ list, |
+ list->GetAllowedMarkerType() == DocumentMarker::kComposition, |
+ list.GetAllowedMarkerType() == DocumentMarker::kComposition); |
+ |
+} // namespace blink |
+ |
+#endif // CompositionMarkerList_h |