Chromium Code Reviews| OLD | NEW |
|---|---|
| (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 EditingMarkerList_h | |
| 6 #define EditingMarkerList_h | |
| 7 | |
| 8 #include "core/editing/markers/DocumentMarkerList.h" | |
| 9 | |
| 10 namespace blink { | |
| 11 | |
| 12 class DocumentMarker; | |
| 13 | |
| 14 class CORE_EXPORT EditingMarkerList : public DocumentMarkerList { | |
|
Xiaocheng
2017/03/27 22:46:22
It's better to also document its behavior in the c
| |
| 15 public: | |
| 16 explicit EditingMarkerList(); | |
| 17 | |
| 18 // DocumentMarkerList implementations | |
| 19 bool isEditingMarkerList() const final; | |
|
Xiaocheng
2017/03/27 22:46:22
Please move all overridden functions to private.
rlanday
2017/03/28 01:05:07
As we discussed offline, I'm going to leave these
| |
| 20 | |
| 21 void add(DocumentMarker*) override; | |
| 22 void clear() final; | |
| 23 | |
| 24 DECLARE_VIRTUAL_TRACE(); | |
| 25 | |
| 26 protected: | |
| 27 // TODO(rlanday): determine if/when we should sort the marker list to improve | |
| 28 // performance | |
| 29 bool markerListIsSorted() const final; | |
| 30 | |
| 31 bool m_markersAreSorted; | |
| 32 | |
| 33 DISALLOW_COPY_AND_ASSIGN(EditingMarkerList); | |
| 34 }; | |
| 35 | |
| 36 DEFINE_TYPE_CASTS(EditingMarkerList, | |
| 37 DocumentMarkerList, | |
| 38 list, | |
| 39 list->isEditingMarkerList(), | |
| 40 list.isEditingMarkerList()); | |
| 41 | |
| 42 } // namespace blink | |
| 43 | |
| 44 #endif // EditingMarkerList_h | |
| OLD | NEW |