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

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

Issue 2911723002: [DMC #24] Add SpellingMarker and GrammarMarker (subclasses of DocumentMarker) (Closed)
Patch Set: Rebase, respond to comments 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/SpellCheckMarker.h
diff --git a/third_party/WebKit/Source/core/editing/markers/SpellCheckMarker.h b/third_party/WebKit/Source/core/editing/markers/SpellCheckMarker.h
new file mode 100644
index 0000000000000000000000000000000000000000..7d3a681896696b629ed48668b0225762f9b12400
--- /dev/null
+++ b/third_party/WebKit/Source/core/editing/markers/SpellCheckMarker.h
@@ -0,0 +1,35 @@
+// 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 SpellCheckMarker_h
+#define SpellCheckMarker_h
+
+#include "core/editing/markers/DocumentMarker.h"
+
+namespace blink {
+
+class CORE_EXPORT SpellCheckMarker : public DocumentMarker {
yosin_UTC9 2017/06/01 03:29:12 Please add a class comment.
+ public:
+ SpellCheckMarker(DocumentMarker::MarkerType,
Xiaocheng 2017/05/31 22:17:16 The ctor should be protected.
+ unsigned start_offset,
+ unsigned end_offset,
+ const String& description);
+
+ const String& Description() const;
yosin_UTC9 2017/06/01 03:29:12 nit: Since this simple getter, you can implement h
+
+ private:
+ const String description_;
+};
yosin_UTC9 2017/06/01 03:29:12 nit: Could you add DISALLOW_COPY_AND_ASSING()?
+
+DEFINE_TYPE_CASTS(SpellCheckMarker,
+ DocumentMarker,
+ marker,
+ marker->GetType() == DocumentMarker::kSpelling ||
+ marker->GetType() == DocumentMarker::kGrammar,
+ marker.GetType() == DocumentMarker::kSpelling ||
+ marker.GetType() == DocumentMarker::kGrammar);
+
+} // namespace blink
+
+#endif

Powered by Google App Engine
This is Rietveld 408576698