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

Side by Side Diff: components/undo/undo_manager.h

Issue 1162943002: Replace more ObserverList with base::ObserverList. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@observer
Patch Set: Created 5 years, 6 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 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_UNDO_UNDO_MANAGER_H_ 5 #ifndef COMPONENTS_UNDO_UNDO_MANAGER_H_
6 #define COMPONENTS_UNDO_UNDO_MANAGER_H_ 6 #define COMPONENTS_UNDO_UNDO_MANAGER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/memory/scoped_vector.h" 10 #include "base/memory/scoped_vector.h"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 102
103 // Returns the undo or redo UndoGroup container that should store the next 103 // Returns the undo or redo UndoGroup container that should store the next
104 // change taking into account if an undo or redo is being executed. 104 // change taking into account if an undo or redo is being executed.
105 ScopedVector<UndoGroup>* GetActiveUndoGroup(); 105 ScopedVector<UndoGroup>* GetActiveUndoGroup();
106 106
107 // Containers of user actions ready for an undo or redo treated as a stack. 107 // Containers of user actions ready for an undo or redo treated as a stack.
108 ScopedVector<UndoGroup> undo_actions_; 108 ScopedVector<UndoGroup> undo_actions_;
109 ScopedVector<UndoGroup> redo_actions_; 109 ScopedVector<UndoGroup> redo_actions_;
110 110
111 // The observers to notify when internal state changes. 111 // The observers to notify when internal state changes.
112 ObserverList<UndoManagerObserver> observers_; 112 base::ObserverList<UndoManagerObserver> observers_;
113 113
114 // Supports grouping operations into a single undo action. 114 // Supports grouping operations into a single undo action.
115 int group_actions_count_; 115 int group_actions_count_;
116 116
117 // The container that is used when actions are grouped. 117 // The container that is used when actions are grouped.
118 scoped_ptr<UndoGroup> pending_grouped_action_; 118 scoped_ptr<UndoGroup> pending_grouped_action_;
119 119
120 // The action that is in the process of being undone. 120 // The action that is in the process of being undone.
121 UndoGroup* undo_in_progress_action_; 121 UndoGroup* undo_in_progress_action_;
122 122
123 // Supports the suspension of undo tracking. 123 // Supports the suspension of undo tracking.
124 int undo_suspended_count_; 124 int undo_suspended_count_;
125 125
126 // Set when executing Undo or Redo so that incoming changes are correctly 126 // Set when executing Undo or Redo so that incoming changes are correctly
127 // processed. 127 // processed.
128 bool performing_undo_; 128 bool performing_undo_;
129 bool performing_redo_; 129 bool performing_redo_;
130 130
131 DISALLOW_COPY_AND_ASSIGN(UndoManager); 131 DISALLOW_COPY_AND_ASSIGN(UndoManager);
132 }; 132 };
133 133
134 #endif // COMPONENTS_UNDO_UNDO_MANAGER_H_ 134 #endif // COMPONENTS_UNDO_UNDO_MANAGER_H_
OLDNEW
« no previous file with comments | « components/ui/zoom/zoom_event_manager.h ('k') | components/update_client/update_client_internal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698