Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / undo / undo_manager_utils.h
blobb99817a1caaab4c697e8e6466f2b59530d0c1b15
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UNDO_UNDO_MANAGER_UTILS_H_
6 #define CHROME_BROWSER_UNDO_UNDO_MANAGER_UTILS_H_
8 #include "base/basictypes.h"
10 class UndoManager;
12 // ScopedSuspendUndoTracking ---------------------------------------------------
14 // Scopes the suspension of the undo tracking for non-user initiated changes
15 // such as those occuring during profile synchronization.
16 class ScopedSuspendUndoTracking {
17 public:
18 explicit ScopedSuspendUndoTracking(UndoManager* undo_manager);
19 ~ScopedSuspendUndoTracking();
21 private:
22 UndoManager* undo_manager_;
24 DISALLOW_COPY_AND_ASSIGN(ScopedSuspendUndoTracking);
27 // ScopedGroupingAction --------------------------------------------------------
29 // Scopes the grouping of a set of changes into one undoable action.
30 class ScopedGroupingAction {
31 public:
32 explicit ScopedGroupingAction(UndoManager* undo_manager);
33 ~ScopedGroupingAction();
35 private:
36 UndoManager* undo_manager_;
38 DISALLOW_COPY_AND_ASSIGN(ScopedGroupingAction);
41 #endif // CHROME_BROWSER_UNDO_UNDO_MANAGER_UTILS_H_