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

Unified Diff: third_party/WebKit/Source/core/editing/commands/UndoStack.h

Issue 2124723002: Reland of "Move UndoStack from Page to Editor" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Hide UndoStack::clear in Editor::clear Created 4 years, 5 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/commands/UndoStack.h
diff --git a/third_party/WebKit/Source/core/editing/commands/UndoStack.h b/third_party/WebKit/Source/core/editing/commands/UndoStack.h
index 39615d15d3bac4c46217529dc1f7faf8130ace83..f6a0f6cbe3e0af8dd42408a1b34bbc2bf7d0aa33 100644
--- a/third_party/WebKit/Source/core/editing/commands/UndoStack.h
+++ b/third_party/WebKit/Source/core/editing/commands/UndoStack.h
@@ -40,6 +40,8 @@ namespace blink {
class LocalFrame;
class UndoStep;
+// |UndoStack| is owned by and always 1:1 to |Editor|. Since |Editor| is 1:1 to
+// |LocalFrame|, |UndoStack| is also 1:1 to |LocalFrame|.
class UndoStack final : public GarbageCollected<UndoStack> {
WTF_MAKE_NONCOPYABLE(UndoStack);
public:
@@ -47,11 +49,11 @@ public:
void registerUndoStep(UndoStep*);
void registerRedoStep(UndoStep*);
- void didUnloadFrame(const LocalFrame&);
bool canUndo() const;
bool canRedo() const;
void undo();
void redo();
+ void clear();
DECLARE_TRACE();
@@ -60,8 +62,6 @@ private:
typedef HeapDeque<Member<UndoStep>> UndoStepStack;
- void filterOutUndoSteps(UndoStepStack&, const LocalFrame&);
-
bool m_inRedo;
UndoStepStack m_undoStack;
UndoStepStack m_redoStack;
« no previous file with comments | « third_party/WebKit/Source/core/editing/Editor.cpp ('k') | third_party/WebKit/Source/core/editing/commands/UndoStack.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698