Index: third_party/WebKit/Source/core/editing/markers/CompositionMarker.h |
diff --git a/third_party/WebKit/Source/core/editing/markers/CompositionMarker.h b/third_party/WebKit/Source/core/editing/markers/CompositionMarker.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..3d5d2c6ebd756e124376db710e8aac5c615e7fed |
--- /dev/null |
+++ b/third_party/WebKit/Source/core/editing/markers/CompositionMarker.h |
@@ -0,0 +1,46 @@ |
+// 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 CompositionMarker_h |
+#define CompositionMarker_h |
+ |
+#include "core/editing/markers/DocumentMarker.h" |
+ |
+namespace blink { |
+ |
+class CORE_EXPORT CompositionMarker final : public DocumentMarker { |
+ public: |
+ CompositionMarker(unsigned startOffset, |
+ unsigned endOffset, |
+ Color underlineColor, |
+ bool thick, |
+ Color backgroundColor); |
+ |
+ // DocumentMarker implementations |
+ CompositionMarker* clone() const final; |
+ MarkerType type() const final; |
+ |
+ // CompositionMarker-specific |
+ Color underlineColor() const; |
+ bool thick() const; |
+ Color backgroundColor() const; |
+ |
+ protected: |
+ CompositionMarker(const CompositionMarker&) = default; |
+ |
+ private: |
+ Color m_underlineColor; |
+ bool m_thick; |
+ Color m_backgroundColor; |
+}; |
+ |
+DEFINE_TYPE_CASTS(CompositionMarker, |
+ DocumentMarker, |
+ marker, |
+ marker->type() == DocumentMarker::Composition, |
+ marker.type() == DocumentMarker::Composition); |
+ |
+} // namespace blink |
+ |
+#endif // CompositionMarker_h |