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

Side by Side Diff: third_party/WebKit/Source/core/editing/spellcheck/SpellCheckRequester.h

Issue 2740603003: Hide SpellCheckRequest from other classes in editing/spellcheck (Closed)
Patch Set: Created 3 years, 9 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) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 25 matching lines...) Expand all
36 #include "wtf/RefPtr.h" 36 #include "wtf/RefPtr.h"
37 #include "wtf/Vector.h" 37 #include "wtf/Vector.h"
38 #include "wtf/text/WTFString.h" 38 #include "wtf/text/WTFString.h"
39 39
40 namespace blink { 40 namespace blink {
41 41
42 class LocalFrame; 42 class LocalFrame;
43 class SpellCheckRequester; 43 class SpellCheckRequester;
44 class TextCheckerClient; 44 class TextCheckerClient;
45 45
46 // TODO(xiaochengh): Move this class to dedicated files.
46 class SpellCheckRequest final : public TextCheckingRequest { 47 class SpellCheckRequest final : public TextCheckingRequest {
47 public: 48 public:
48 static SpellCheckRequest* create(const EphemeralRange& checkingRange, 49 static SpellCheckRequest* create(const EphemeralRange& checkingRange,
49 int requestNumber = 0); 50 int requestNumber);
yosin_UTC9 2017/03/09 01:28:15 Good! We should avoid to use default parameter.
50 51
51 ~SpellCheckRequest() override; 52 ~SpellCheckRequest() override;
52 void dispose(); 53 void dispose();
53 54
54 Range* checkingRange() const { return m_checkingRange; } 55 Range* checkingRange() const { return m_checkingRange; }
55 Element* rootEditableElement() const { return m_rootEditableElement; } 56 Element* rootEditableElement() const { return m_rootEditableElement; }
56 57
57 void setCheckerAndSequence(SpellCheckRequester*, int sequence); 58 void setCheckerAndSequence(SpellCheckRequester*, int sequence);
58 59
59 const TextCheckingRequestData& data() const override; 60 const TextCheckingRequestData& data() const override;
(...skipping 20 matching lines...) Expand all
80 WTF_MAKE_NONCOPYABLE(SpellCheckRequester); 81 WTF_MAKE_NONCOPYABLE(SpellCheckRequester);
81 82
82 public: 83 public:
83 static SpellCheckRequester* create(LocalFrame& frame) { 84 static SpellCheckRequester* create(LocalFrame& frame) {
84 return new SpellCheckRequester(frame); 85 return new SpellCheckRequester(frame);
85 } 86 }
86 87
87 ~SpellCheckRequester(); 88 ~SpellCheckRequester();
88 DECLARE_TRACE(); 89 DECLARE_TRACE();
89 90
90 void requestCheckingFor(SpellCheckRequest*); 91 void requestCheckingFor(const EphemeralRange&);
92 void requestCheckingFor(const EphemeralRange&, int requestNum);
91 void cancelCheck(); 93 void cancelCheck();
92 94
93 int lastRequestSequence() const { return m_lastRequestSequence; } 95 int lastRequestSequence() const { return m_lastRequestSequence; }
94 96
95 int lastProcessedSequence() const { return m_lastProcessedSequence; } 97 int lastProcessedSequence() const { return m_lastProcessedSequence; }
96 98
97 // Exposed for leak detector only, see comment for corresponding 99 // Exposed for leak detector only, see comment for corresponding
98 // SpellChecker method. 100 // SpellChecker method.
99 void prepareForLeakDetection(); 101 void prepareForLeakDetection();
100 102
(...skipping 25 matching lines...) Expand all
126 128
127 Member<SpellCheckRequest> m_processingRequest; 129 Member<SpellCheckRequest> m_processingRequest;
128 130
129 typedef HeapDeque<Member<SpellCheckRequest>> RequestQueue; 131 typedef HeapDeque<Member<SpellCheckRequest>> RequestQueue;
130 RequestQueue m_requestQueue; 132 RequestQueue m_requestQueue;
131 }; 133 };
132 134
133 } // namespace blink 135 } // namespace blink
134 136
135 #endif // SpellCheckRequester_h 137 #endif // SpellCheckRequester_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698