Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / undo / undo_manager_utils.cc
blob48c1d0e0b4f774907fc7609dd8b7c5527e23036b
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 #include "chrome/browser/undo/undo_manager_utils.h"
7 #include "chrome/browser/undo/undo_manager.h"
9 // ScopedSuspendUndoTracking --------------------------------------------------
11 ScopedSuspendUndoTracking::ScopedSuspendUndoTracking(UndoManager* undo_manager)
12 : undo_manager_(undo_manager) {
13 undo_manager_->SuspendUndoTracking();
16 ScopedSuspendUndoTracking::~ScopedSuspendUndoTracking() {
17 undo_manager_->ResumeUndoTracking();
20 // ScopedGroupingAction -------------------------------------------------------
22 ScopedGroupingAction::ScopedGroupingAction(UndoManager* undo_manager)
23 : undo_manager_(undo_manager) {
24 undo_manager_->StartGroupingActions();
27 ScopedGroupingAction::~ScopedGroupingAction() {
28 undo_manager_->EndGroupingActions();