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

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

Issue 2780313002: [WIP] Refactor DocumentMarker (Closed)
Patch Set: Rebase 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/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

Powered by Google App Engine
This is Rietveld 408576698