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

Side by Side Diff: chrome/browser/undo/undo_manager_utils.cc

Issue 20571004: Helper classes to scope undo action. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/undo/undo_manager_utils.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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.
4
5 #include "chrome/browser/undo/undo_manager_utils.h"
6
7 #include "chrome/browser/undo/undo_manager.h"
8
9 // ScopedSuspendUndoTracking --------------------------------------------------
10
11 ScopedSuspendUndoTracking::ScopedSuspendUndoTracking(UndoManager* undo_manager)
12 : undo_manager_(undo_manager) {
13 undo_manager_->SuspendUndoTracking();
14 }
15
16 ScopedSuspendUndoTracking::~ScopedSuspendUndoTracking() {
17 undo_manager_->ResumeUndoTracking();
18 }
19
20 // ScopedGroupingAction -------------------------------------------------------
21
22 ScopedGroupingAction::ScopedGroupingAction(UndoManager* undo_manager)
23 : undo_manager_(undo_manager) {
24 undo_manager_->StartGroupingActions();
25 }
26
27 ScopedGroupingAction::~ScopedGroupingAction() {
28 undo_manager_->EndGroupingActions();
29 }
OLDNEW
« no previous file with comments | « chrome/browser/undo/undo_manager_utils.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698