Chromium Code Reviews| Index: third_party/WebKit/Source/core/editing/BackspaceStateMachine.h |
| diff --git a/third_party/WebKit/Source/core/editing/BackspaceStateMachine.h b/third_party/WebKit/Source/core/editing/BackspaceStateMachine.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..0a225184dfb4a5a4e4e7647bca71f29b19811f00 |
| --- /dev/null |
| +++ b/third_party/WebKit/Source/core/editing/BackspaceStateMachine.h |
| @@ -0,0 +1,39 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef BackspaceStateMachine_h |
| +#define BackspaceStateMachine_h |
| + |
| +#include "core/CoreExport.h" |
| +#include "wtf/Noncopyable.h" |
| +#include <stdint.h> |
| + |
| +namespace blink { |
| + |
| +class CORE_EXPORT BackspaceStateMachine { |
| + WTF_MAKE_NONCOPYABLE(BackspaceStateMachine); |
|
yosin_UTC9
2016/03/25 10:01:05
Oops, one more, please add |STACK_ALLOCATED();|
Seigo Nonaka
2016/03/25 10:26:32
Thank you very much. I'm sorry I'm not familiar wi
|
| +public: |
| + BackspaceStateMachine(); |
| + |
| + // Returns true when the state machine has stopped. |
| + bool updateState(uint16_t codeUnit); |
| + |
| + // Finalize the state machine and returns the code unit count to be deleted. |
| + // If the state machine hasn't finished, this method finishes the state |
| + // machine first. |
| + int finalizeAndGetCodeUnitCountToBeDeleted(); |
| + |
| + // Resets the internal state to the initial state. |
| + void reset(); |
| + |
| +private: |
| + int m_CodeUnitsToBeDeleted = 0; |
|
yosin_UTC9
2016/03/25 10:01:05
s/m_CodeUnitsToBeDeleted/m_codeUnitsToBeDeleted/
Seigo Nonaka
2016/03/25 10:26:32
Done.
|
| + |
| + // Used for composing supplementary code point with surrogate pairs. |
| + uint16_t m_TrailSurrogate = 0; |
|
yosin_UTC9
2016/03/25 10:01:05
s/m_TrailSurrogate/m_trailSurrogate/
Seigo Nonaka
2016/03/25 10:26:32
Done.
|
| +}; |
| + |
| +} // namespace blink |
| + |
| +#endif |