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

Unified Diff: third_party/WebKit/Source/core/editing/StateMachineCommon.cpp

Issue 1839753005: Move state machines to state_machines subdir (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: extracted machine state for other state machines. Created 4 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/editing/StateMachineCommon.cpp
diff --git a/third_party/WebKit/Source/core/editing/StateMachineCommon.cpp b/third_party/WebKit/Source/core/editing/StateMachineCommon.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..a979c0dbeaae84698b5388b6afb714d0ec4dbd1f
--- /dev/null
+++ b/third_party/WebKit/Source/core/editing/StateMachineCommon.cpp
@@ -0,0 +1,33 @@
+// 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.
+
+#include "StateMachineCommon.h"
+
+#include "wtf/Assertions.h"
+#include <ostream> // NOLINT
+
+namespace blink {
+
+std::ostream& operator << (std::ostream& os, MachineState state)
+{
+ switch (state) {
+ case MachineState::Invalid:
+ os << "Invalid";
+ break;
+ case MachineState::NeedMoreCodeUnit:
+ os << "NeedMoreCodeUnit";
+ break;
+ case MachineState::NeedFollowingCodeUnit:
+ os << "NeedFollowingCodeUnit";
+ break;
+ case MachineState::Finished:
+ os << "Finished";
+ break;
+ default:
+ NOTREACHED(); // Please add once you add new state.
+ }
+ return os;
+}
+
+} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698