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

Unified Diff: chrome/common/spellcheck_marker.h

Issue 15861019: Collect spelling service feedback on Mac (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Merge master Created 7 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: chrome/common/spellcheck_marker.h
diff --git a/chrome/common/spellcheck_marker.h b/chrome/common/spellcheck_marker.h
index 551f7dcd1cdac6410e05752195d7aece8f0a375c..3b04cadb298fe974f51ccb68da103cbd930114a5 100644
--- a/chrome/common/spellcheck_marker.h
+++ b/chrome/common/spellcheck_marker.h
@@ -5,7 +5,20 @@
#ifndef CHROME_COMMON_SPELLCHECK_MARKER_H_
#define CHROME_COMMON_SPELLCHECK_MARKER_H_
-struct SpellCheckMarker {
+class SpellCheckMarker {
+ public:
+ // A predicate to test spellcheck marker validity.
+ class IsValidPredicate {
+ public:
+ typedef SpellCheckMarker argument_type;
+ explicit IsValidPredicate(size_t text_length) : text_length_(text_length) {}
+ bool operator()(const SpellCheckMarker& marker) const {
+ return marker.offset < text_length_;
+ }
+ private:
+ size_t text_length_;
+ };
+
// IPC requires a default constructor.
SpellCheckMarker() : hash(-1), offset(-1) {}
« no previous file with comments | « chrome/browser/spellchecker/spellcheck_message_filter_mac_browsertest.cc ('k') | chrome/common/spellcheck_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698