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

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

Issue 2919173002: Add DocumentMarker::kActiveSuggestion MarkerType (Closed)
Patch Set: Created 3 years, 7 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/MarkerWithFormatting.h
diff --git a/third_party/WebKit/Source/core/editing/markers/MarkerWithFormatting.h b/third_party/WebKit/Source/core/editing/markers/MarkerWithFormatting.h
new file mode 100644
index 0000000000000000000000000000000000000000..74cdb094ec1e1e9d2ea749a20a896fed15ca22c8
--- /dev/null
+++ b/third_party/WebKit/Source/core/editing/markers/MarkerWithFormatting.h
@@ -0,0 +1,37 @@
+// 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 MarkerWithFormatting_h
+#define MarkerWithFormatting_h
+
+#include "core/editing/markers/DocumentMarker.h"
+
+namespace blink {
+
+// An abstract subclass of DocumentMarker to be subclassed by DocumentMarkers
+// that should be renderable with customizable formatting.
+class CORE_EXPORT MarkerWithFormatting : public DocumentMarker {
+ public:
+ enum class Thickness { kThin, kThick };
+
+ MarkerWithFormatting(unsigned start_offset,
+ unsigned end_offset,
+ Color underline_color,
+ Thickness,
+ Color background_color);
+
+ // MarkerWithFormatting-specific
+ Color UnderlineColor() const;
+ bool IsThick() const;
+ Color BackgroundColor() const;
+
+ private:
+ const Color underline_color_;
+ const Color background_color_;
+ const Thickness thickness_;
+};
+
+} // namespace blink
+
+#endif

Powered by Google App Engine
This is Rietveld 408576698