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

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

Issue 2581063002: Add IdleSpellCheckCallback to LocalFrame (Closed)
Patch Set: Fri Dec 16 12:24:18 JST 2016 Created 4 years 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/LocalFrame.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef IdleSpellCheckCallback_h 5 #ifndef IdleSpellCheckCallback_h
6 #define IdleSpellCheckCallback_h 6 #define IdleSpellCheckCallback_h
7 7
8 #include "core/dom/IdleRequestCallback.h" 8 #include "core/dom/IdleRequestCallback.h"
9 #include "core/frame/LocalFrame.h" 9 #include "core/frame/LocalFrame.h"
10 #include "platform/Timer.h" 10 #include "platform/Timer.h"
11 11
12 namespace blink { 12 namespace blink {
13 13
14 // Main class for the implementation of idle time spell checker. 14 // Main class for the implementation of idle time spell checker.
15 class IdleSpellCheckCallback final : public IdleRequestCallback { 15 class IdleSpellCheckCallback final : public IdleRequestCallback {
16 public: 16 public:
17 // TODO(xiaochengh): Make each LocalFrame own an IdleSpellCheckCallback.
18 static IdleSpellCheckCallback* create(LocalFrame&); 17 static IdleSpellCheckCallback* create(LocalFrame&);
19 ~IdleSpellCheckCallback() override; 18 ~IdleSpellCheckCallback() override;
20 19
21 // Transit to HotModeRequested, if possible. Called by operations that need 20 // Transit to HotModeRequested, if possible. Called by operations that need
22 // spell checker to follow up. 21 // spell checker to follow up.
23 // TODO(xiaochengh): Add proper call sites. 22 // TODO(xiaochengh): Add proper call sites.
24 void setNeedsHotModeInvocation(); 23 void setNeedsHotModeInvocation();
25 24
26 // Transit to ColdModeTimerStarted, if possible. Sets up a timer, and requests 25 // Transit to ColdModeTimerStarted, if possible. Sets up a timer, and requests
27 // cold mode invocation if no critical operation occurs before timer firing. 26 // cold mode invocation if no critical operation occurs before timer firing.
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 State m_state; 66 State m_state;
68 const Member<LocalFrame> m_frame; 67 const Member<LocalFrame> m_frame;
69 68
70 // TODO(xiaochengh): assign the timer to some proper task runner. 69 // TODO(xiaochengh): assign the timer to some proper task runner.
71 Timer<IdleSpellCheckCallback> m_coldModeTimer; 70 Timer<IdleSpellCheckCallback> m_coldModeTimer;
72 }; 71 };
73 72
74 } // namespace blink 73 } // namespace blink
75 74
76 #endif // IdleSpellCheckCallback_h 75 #endif // IdleSpellCheckCallback_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/LocalFrame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698