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

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

Issue 2642663002: Rename class EditCommandComposition to UndoStep (Closed)
Patch Set: Remove a redundant TODO Created 3 years, 11 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 19 matching lines...) Expand all
30 30
31 #ifndef UndoStack_h 31 #ifndef UndoStack_h
32 #define UndoStack_h 32 #define UndoStack_h
33 33
34 #include "platform/heap/Handle.h" 34 #include "platform/heap/Handle.h"
35 #include "wtf/Deque.h" 35 #include "wtf/Deque.h"
36 #include "wtf/Forward.h" 36 #include "wtf/Forward.h"
37 37
38 namespace blink { 38 namespace blink {
39 39
40 class EditCommandComposition;
41 class LocalFrame; 40 class LocalFrame;
41 class UndoStep;
42 42
43 // |UndoStack| is owned by and always 1:1 to |Editor|. Since |Editor| is 1:1 to 43 // |UndoStack| is owned by and always 1:1 to |Editor|. Since |Editor| is 1:1 to
44 // |LocalFrame|, |UndoStack| is also 1:1 to |LocalFrame|. 44 // |LocalFrame|, |UndoStack| is also 1:1 to |LocalFrame|.
45 class UndoStack final : public GarbageCollected<UndoStack> { 45 class UndoStack final : public GarbageCollected<UndoStack> {
46 WTF_MAKE_NONCOPYABLE(UndoStack); 46 WTF_MAKE_NONCOPYABLE(UndoStack);
47 47
48 public: 48 public:
49 static UndoStack* create(); 49 static UndoStack* create();
50 50
51 void registerUndoStep(EditCommandComposition*); 51 void registerUndoStep(UndoStep*);
52 void registerRedoStep(EditCommandComposition*); 52 void registerRedoStep(UndoStep*);
53 bool canUndo() const; 53 bool canUndo() const;
54 bool canRedo() const; 54 bool canRedo() const;
55 void undo(); 55 void undo();
56 void redo(); 56 void redo();
57 void clear(); 57 void clear();
58 58
59 DECLARE_TRACE(); 59 DECLARE_TRACE();
60 60
61 private: 61 private:
62 UndoStack(); 62 UndoStack();
63 63
64 typedef HeapDeque<Member<EditCommandComposition>> UndoStepStack; 64 typedef HeapDeque<Member<UndoStep>> UndoStepStack;
65 65
66 bool m_inRedo; 66 bool m_inRedo;
67 UndoStepStack m_undoStack; 67 UndoStepStack m_undoStack;
68 UndoStepStack m_redoStack; 68 UndoStepStack m_redoStack;
69 }; 69 };
70 70
71 } // namespace blink 71 } // namespace blink
72 72
73 #endif 73 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698