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

Unified Diff: third_party/WebKit/Source/core/editing/markers/SingletonMarkerListImpl.h

Issue 2820203003: [DMC #4] Add SingletonMarkerListImpl (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/editing/markers/SingletonMarkerListImpl.h
diff --git a/third_party/WebKit/Source/core/editing/markers/SingletonMarkerListImpl.h b/third_party/WebKit/Source/core/editing/markers/SingletonMarkerListImpl.h
new file mode 100644
index 0000000000000000000000000000000000000000..250c26608bd63dc45228c0df579e66efaca139f1
--- /dev/null
+++ b/third_party/WebKit/Source/core/editing/markers/SingletonMarkerListImpl.h
@@ -0,0 +1,38 @@
+// Copyright 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 SingletonMarkerListImpl_h
+#define SingletonMarkerListImpl_h
+
+#include "core/editing/markers/DocumentMarkerList.h"
+
+namespace blink {
+
+class CORE_EXPORT SingletonMarkerListImpl : public DocumentMarkerList {
+ public:
+ SingletonMarkerListImpl() = default;
+
+ bool IsEmpty() const final;
+
+ void Add(DocumentMarker*) final;
+ void Clear() final;
+
+ void AppendMarkersToInputList(DocumentMarkerVector* list) const final;
+
+ bool MoveMarkers(int length, DocumentMarkerList* dst_list) final;
+ bool RemoveMarkers(unsigned start_offset, int length) final;
+ bool ShiftMarkers(unsigned offset,
+ unsigned old_length,
+ unsigned new_length) final;
+ DECLARE_TRACE();
+
+ private:
+ Member<DocumentMarker> marker_;
+
+ DISALLOW_COPY_AND_ASSIGN(SingletonMarkerListImpl);
+};
+
+} // namespace blink
+
+#endif // SingletonMarkerListImpl_h

Powered by Google App Engine
This is Rietveld 408576698