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..cb0c0a671d3341e6882f5ea64cc9503957e0d3da |
--- /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; |
+ |
+ Color underlineColor() const final; |
+ bool thick() const final; |
+ Color backgroundColor() const final; |
+ |
+ 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 |