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

Side by Side Diff: Source/core/editing/UndoStack.h

Issue 299353004: Oilpan: move editing objects to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 7 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 13 matching lines...) Expand all
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
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 "wtf/Deque.h" 35 #include "wtf/Deque.h"
35 #include "wtf/Forward.h" 36 #include "wtf/Forward.h"
36 37
37 namespace WebCore { 38 namespace WebCore {
38 39
39 class LocalFrame; 40 class LocalFrame;
40 class UndoStep; 41 class UndoStep;
41 42
42 class UndoStack { 43 class UndoStack {
43 public: 44 public:
44 static PassOwnPtr<UndoStack> create(); 45 static PassOwnPtr<UndoStack> create();
45 46
46 ~UndoStack(); 47 ~UndoStack();
47 48
48 void registerUndoStep(PassRefPtr<UndoStep>); 49 void registerUndoStep(PassRefPtrWillBeRawPtr<UndoStep>);
49 void registerRedoStep(PassRefPtr<UndoStep>); 50 void registerRedoStep(PassRefPtrWillBeRawPtr<UndoStep>);
50 void didUnloadFrame(const LocalFrame&); 51 void didUnloadFrame(const LocalFrame&);
51 bool canUndo() const; 52 bool canUndo() const;
52 bool canRedo() const; 53 bool canRedo() const;
53 void undo(); 54 void undo();
54 void redo(); 55 void redo();
55 56
56 private: 57 private:
57 UndoStack(); 58 UndoStack();
58 59
59 bool m_inRedo; 60 bool m_inRedo;
60 61
61 typedef Deque<RefPtr<UndoStep> > UndoStepStack; 62 typedef WillBePersistentHeapDeque<RefPtrWillBeMember<UndoStep> > UndoStepSta ck;
haraken 2014/05/26 02:36:12 Shall we avoid using typedef for persistent collec
zerny-chromium 2014/05/26 07:51:08 In other places we have used a typedef pair to avo
sof 2014/05/28 08:31:35 Followed that.
62 void filterOutUndoSteps(UndoStepStack&, const LocalFrame&); 63 void filterOutUndoSteps(UndoStepStack&, const LocalFrame&);
63 UndoStepStack m_undoStack; 64 UndoStepStack m_undoStack;
64 UndoStepStack m_redoStack; 65 UndoStepStack m_redoStack;
65 }; 66 };
66 67
67 } // namespace WebCore 68 } // namespace WebCore
68 69
69 #endif 70 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698