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

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

Issue 2923033002: [ActiveSuggestionMarker #2] Add ActiveSuggestionMarker (Closed)
Patch Set: Update comment on ActiveSuggestionMarker.h Created 3 years, 6 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/ActiveSuggestionMarker.h
diff --git a/third_party/WebKit/Source/core/editing/markers/ActiveSuggestionMarker.h b/third_party/WebKit/Source/core/editing/markers/ActiveSuggestionMarker.h
new file mode 100644
index 0000000000000000000000000000000000000000..54bcecea975cfa581d897c95a18f7b90869cb94d
--- /dev/null
+++ b/third_party/WebKit/Source/core/editing/markers/ActiveSuggestionMarker.h
@@ -0,0 +1,38 @@
+// 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 ActiveSuggestionMarker_h
+#define ActiveSuggestionMarker_h
+
+#include "core/editing/markers/StyleableMarker.h"
+
+namespace blink {
+
+// A subclass of StyleableMarker used to represent ActiveSuggestion markers,
+// which are used to mark the region of text an open spellcheck or suggestion
+// menu pertains to.
+class CORE_EXPORT ActiveSuggestionMarker final : public StyleableMarker {
+ public:
+ ActiveSuggestionMarker(unsigned start_offset,
+ unsigned end_offset,
+ Color underline_color,
+ Thickness,
+ Color background_color);
+
+ // DocumentMarker implementations
+ MarkerType GetType() const final;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ActiveSuggestionMarker);
+};
+
+DEFINE_TYPE_CASTS(ActiveSuggestionMarker,
+ DocumentMarker,
+ marker,
+ marker->GetType() == DocumentMarker::kActiveSuggestion,
+ marker.GetType() == DocumentMarker::kActiveSuggestion);
+
+} // namespace blink
+
+#endif

Powered by Google App Engine
This is Rietveld 408576698