Chromium Code Reviews| Index: third_party/WebKit/Source/core/editing/markers/DocumentMarkerList.h |
| diff --git a/third_party/WebKit/Source/core/editing/markers/DocumentMarkerList.h b/third_party/WebKit/Source/core/editing/markers/DocumentMarkerList.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..4c56620e05f69a4c2d856edb28454fdffde3140f |
| --- /dev/null |
| +++ b/third_party/WebKit/Source/core/editing/markers/DocumentMarkerList.h |
| @@ -0,0 +1,54 @@ |
| +// 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 DocumentMarkerList_h |
| +#define DocumentMarkerList_h |
| + |
| +#include "core/CoreExport.h" |
| +#include "platform/heap/Handle.h" |
| + |
| +namespace blink { |
| + |
| +class DocumentMarker; |
| +class RenderedDocumentMarker; |
| + |
| +class CORE_EXPORT DocumentMarkerList |
|
yosin_UTC9
2017/04/25 08:20:59
Could you add short description of this interface
|
| + : public GarbageCollectedFinalized<DocumentMarkerList> { |
| + public: |
| + DocumentMarkerList(); |
|
yosin_UTC9
2017/04/25 08:20:59
ctor should have protected accessibility. Since we
|
| + |
| + virtual ~DocumentMarkerList(); |
| + |
| + virtual bool IsEmpty() const = 0; |
| + |
| + virtual void Add(DocumentMarker*) = 0; |
| + virtual void Clear() = 0; |
| + |
| + virtual const HeapVector<Member<RenderedDocumentMarker>>& GetMarkers() |
| + const = 0; |
| + |
| + // Returns true if at least one marker is copied, false otherwise |
| + virtual bool MoveMarkers(int length, DocumentMarkerList* dst_list) = 0; |
| + |
| + // Returns true if at least one marker is removed, false otherwise |
| + virtual bool RemoveMarkers(unsigned start_offset, int length) = 0; |
| + |
| + // Returns true if a marker was removed, false otherwise. |
| + // TODO(rlanday): remove this method from this interface once we have a |
| + // Spelling/Grammar-specific marker list impl to put this on |
| + virtual bool RemoveMarkersUnderWords(const String& node_text, |
| + const Vector<String>& words) = 0; |
| + |
| + // Returns true if at least one marker is shifted or removed, false otherwise |
| + virtual bool ShiftMarkers(unsigned offset, |
| + unsigned old_length, |
| + unsigned new_length) = 0; |
| + |
| + DEFINE_INLINE_VIRTUAL_TRACE() {} |
| + DISALLOW_COPY_AND_ASSIGN(DocumentMarkerList); |
|
yosin_UTC9
2017/04/25 08:20:59
DISALLOW_COPY_AND_ASSIGN(...) should have private
|
| +}; |
| + |
| +} // namespace blink |
| + |
| +#endif // DocumentMarkerList_h |