| OLD | NEW |
| 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 #include "core/editing/spellcheck/IdleSpellCheckCallback.h" | 5 #include "core/editing/spellcheck/IdleSpellCheckCallback.h" |
| 6 | 6 |
| 7 #include "core/dom/IdleRequestOptions.h" | 7 #include "core/dom/IdleRequestOptions.h" |
| 8 #include "core/dom/TaskRunnerHelper.h" | 8 #include "core/dom/TaskRunnerHelper.h" |
| 9 #include "core/editing/EditingUtilities.h" | 9 #include "core/editing/EditingUtilities.h" |
| 10 #include "core/editing/Editor.h" | 10 #include "core/editing/Editor.h" |
| 11 #include "core/editing/FrameSelection.h" | 11 #include "core/editing/FrameSelection.h" |
| 12 #include "core/editing/VisibleSelection.h" | 12 #include "core/editing/VisibleSelection.h" |
| 13 #include "core/editing/VisibleUnits.h" | 13 #include "core/editing/VisibleUnits.h" |
| 14 #include "core/editing/commands/UndoStack.h" | 14 #include "core/editing/commands/UndoStack.h" |
| 15 #include "core/editing/commands/UndoStep.h" | 15 #include "core/editing/commands/UndoStep.h" |
| 16 #include "core/editing/iterators/CharacterIterator.h" | 16 #include "core/editing/iterators/CharacterIterator.h" |
| 17 #include "core/editing/spellcheck/ColdModeSpellCheckRequester.h" | 17 #include "core/editing/spellcheck/ColdModeSpellCheckRequester.h" |
| 18 #include "core/editing/spellcheck/HotModeSpellCheckRequester.h" | 18 #include "core/editing/spellcheck/HotModeSpellCheckRequester.h" |
| 19 #include "core/editing/spellcheck/SpellCheckRequester.h" | 19 #include "core/editing/spellcheck/SpellCheckRequester.h" |
| 20 #include "core/editing/spellcheck/SpellChecker.h" | 20 #include "core/editing/spellcheck/SpellChecker.h" |
| 21 #include "core/frame/LocalFrame.h" | 21 #include "core/frame/LocalFrame.h" |
| 22 #include "platform/RuntimeEnabledFeatures.h" | 22 #include "platform/RuntimeEnabledFeatures.h" |
| 23 #include "platform/instrumentation/tracing/TraceEvent.h" | 23 #include "platform/instrumentation/tracing/TraceEvent.h" |
| 24 #include "wtf/CurrentTime.h" | 24 #include "platform/wtf/CurrentTime.h" |
| 25 | 25 |
| 26 namespace blink { | 26 namespace blink { |
| 27 | 27 |
| 28 namespace { | 28 namespace { |
| 29 | 29 |
| 30 const int kColdModeTimerIntervalMS = 1000; | 30 const int kColdModeTimerIntervalMS = 1000; |
| 31 const int kConsecutiveColdModeTimerIntervalMS = 200; | 31 const int kConsecutiveColdModeTimerIntervalMS = 200; |
| 32 const int kHotModeRequestTimeoutMS = 200; | 32 const int kHotModeRequestTimeoutMS = 200; |
| 33 const int kInvalidHandle = -1; | 33 const int kInvalidHandle = -1; |
| 34 const int kDummyHandleForForcedInvocation = -2; | 34 const int kDummyHandleForForcedInvocation = -2; |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 DCHECK(cold_mode_timer_.IsActive()); | 225 DCHECK(cold_mode_timer_.IsActive()); |
| 226 cold_mode_timer_.Stop(); | 226 cold_mode_timer_.Stop(); |
| 227 ColdModeTimerFired(&cold_mode_timer_); | 227 ColdModeTimerFired(&cold_mode_timer_); |
| 228 } | 228 } |
| 229 | 229 |
| 230 void IdleSpellCheckCallback::SetNeedsMoreColdModeInvocationForTesting() { | 230 void IdleSpellCheckCallback::SetNeedsMoreColdModeInvocationForTesting() { |
| 231 cold_mode_requester_->SetNeedsMoreInvocationForTesting(); | 231 cold_mode_requester_->SetNeedsMoreInvocationForTesting(); |
| 232 } | 232 } |
| 233 | 233 |
| 234 } // namespace blink | 234 } // namespace blink |
| OLD | NEW |