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

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

Issue 2763893002: [WIP] Clean up DocumentMarkerController API (Closed)
Patch Set: Created 3 years, 9 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/DocumentMarker.h
diff --git a/third_party/WebKit/Source/core/editing/markers/DocumentMarker.h b/third_party/WebKit/Source/core/editing/markers/DocumentMarker.h
index 4c8a32463688898f4c4ff4c683d647a879371295..0bf6062a13547b4d987ca0f9c1c58cfb479f0910 100644
--- a/third_party/WebKit/Source/core/editing/markers/DocumentMarker.h
+++ b/third_party/WebKit/Source/core/editing/markers/DocumentMarker.h
@@ -91,16 +91,22 @@ class CORE_EXPORT DocumentMarker : public GarbageCollected<DocumentMarker> {
SpellCheckClientMarkers() : MarkerTypes(Spelling | Grammar) {}
};
- DocumentMarker(MarkerType,
- unsigned startOffset,
- unsigned endOffset,
- const String& description);
- DocumentMarker(unsigned startOffset, unsigned endOffset, bool activeMatch);
- DocumentMarker(unsigned startOffset,
- unsigned endOffset,
- Color underlineColor,
- bool thick,
- Color backgroundColor);
+ static DocumentMarker* createCompositionMarker(unsigned startOffset,
+ unsigned endOffset,
+ Color underlineColor,
+ bool thick,
+ Color backgroundColor);
+ static DocumentMarker* createGrammarMarker(
+ unsigned startOffset,
+ unsigned endOffset,
+ const String& description = emptyString);
+ static DocumentMarker* createSpellingMarker(
+ unsigned startOffset,
+ unsigned endOffset,
+ const String& description = emptyString);
+ static DocumentMarker* createTextMatchMarker(unsigned startOffset,
+ unsigned endOffset,
+ bool activeMatch);
DocumentMarker(const DocumentMarker&);
@@ -147,6 +153,11 @@ class CORE_EXPORT DocumentMarker : public GarbageCollected<DocumentMarker> {
DECLARE_TRACE();
private:
+ DocumentMarker(MarkerType,
+ unsigned startOffset,
+ unsigned endOffset,
+ DocumentMarkerDetails*);
+
MarkerType m_type;
unsigned m_startOffset;
unsigned m_endOffset;

Powered by Google App Engine
This is Rietveld 408576698