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

Side by Side Diff: third_party/WebKit/Source/platform/text/TextChecking.h

Issue 2177023002: Remove spellchecker feedback. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile Created 4 years, 4 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2011 Google Inc. All rights reserved. 2 * Copyright (c) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 String userDescription; 60 String userDescription;
61 }; 61 };
62 62
63 struct TextCheckingResult { 63 struct TextCheckingResult {
64 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); 64 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW();
65 TextDecorationType decoration; 65 TextDecorationType decoration;
66 int location; 66 int location;
67 int length; 67 int length;
68 Vector<GrammarDetail> details; 68 Vector<GrammarDetail> details;
69 String replacement; 69 String replacement;
70 uint32_t hash;
71 }; 70 };
72 71
73 const int unrequestedTextCheckingSequence = -1; 72 const int unrequestedTextCheckingSequence = -1;
74 73
75 class TextCheckingRequestData final { 74 class TextCheckingRequestData final {
76 DISALLOW_NEW(); 75 DISALLOW_NEW();
77 friend class SpellCheckRequest; // For access to m_sequence. 76 friend class SpellCheckRequest; // For access to m_sequence.
78 public: 77 public:
79 TextCheckingRequestData() 78 TextCheckingRequestData()
80 : m_sequence(unrequestedTextCheckingSequence) 79 : m_sequence(unrequestedTextCheckingSequence)
81 , m_mask(TextCheckingTypeNone) 80 , m_mask(TextCheckingTypeNone)
82 , m_processType(TextCheckingProcessIncremental) 81 , m_processType(TextCheckingProcessIncremental)
83 { } 82 { }
84 TextCheckingRequestData(int sequence, const String& text, TextCheckingTypeMa sk mask, TextCheckingProcessType processType, const Vector<uint32_t>& markers, c onst Vector<unsigned>& offsets) 83 TextCheckingRequestData(int sequence, const String& text, TextCheckingTypeMa sk mask, TextCheckingProcessType processType)
85 : m_sequence(sequence) 84 : m_sequence(sequence)
86 , m_text(text) 85 , m_text(text)
87 , m_mask(mask) 86 , m_mask(mask)
88 , m_processType(processType) 87 , m_processType(processType)
89 , m_markers(markers)
90 , m_offsets(offsets)
91 { } 88 { }
92 89
93 int sequence() const { return m_sequence; } 90 int sequence() const { return m_sequence; }
94 String text() const { return m_text; } 91 String text() const { return m_text; }
95 TextCheckingTypeMask mask() const { return m_mask; } 92 TextCheckingTypeMask mask() const { return m_mask; }
96 bool maskContains(TextCheckingType type) const { return m_mask & type; } 93 bool maskContains(TextCheckingType type) const { return m_mask & type; }
97 TextCheckingProcessType processType() const { return m_processType; } 94 TextCheckingProcessType processType() const { return m_processType; }
98 const Vector<uint32_t>& markers() const { return m_markers; }
99 const Vector<unsigned>& offsets() const { return m_offsets; }
100 95
101 private: 96 private:
102 int m_sequence; 97 int m_sequence;
103 String m_text; 98 String m_text;
104 TextCheckingTypeMask m_mask; 99 TextCheckingTypeMask m_mask;
105 TextCheckingProcessType m_processType; 100 TextCheckingProcessType m_processType;
106 Vector<uint32_t> m_markers;
107 Vector<unsigned> m_offsets;
108 }; 101 };
109 102
110 class TextCheckingRequest : public GarbageCollectedFinalized<TextCheckingRequest > { 103 class TextCheckingRequest : public GarbageCollectedFinalized<TextCheckingRequest > {
111 public: 104 public:
112 virtual ~TextCheckingRequest() { } 105 virtual ~TextCheckingRequest() { }
113 DEFINE_INLINE_VIRTUAL_TRACE() { } 106 DEFINE_INLINE_VIRTUAL_TRACE() { }
114 107
115 virtual const TextCheckingRequestData& data() const = 0; 108 virtual const TextCheckingRequestData& data() const = 0;
116 virtual void didSucceed(const Vector<TextCheckingResult>&) = 0; 109 virtual void didSucceed(const Vector<TextCheckingResult>&) = 0;
117 virtual void didCancel() = 0; 110 virtual void didCancel() = 0;
118 }; 111 };
119 112
120 } // namespace blink 113 } // namespace blink
121 114
122 #endif // TextChecking_h 115 #endif // TextChecking_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698