blob: 83a033b548cd0bccc72213c47322709e4f8e3265 [file] [log] [blame]
// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ui/base/idle/scoped_set_idle_state.h"
#include "ui/base/idle/idle_internal.h"
namespace ui {
ScopedSetIdleState::ScopedSetIdleState(IdleState state)
: previous_state_(IdleStateForTesting()) {
IdleStateForTesting() = state;
}
ScopedSetIdleState::~ScopedSetIdleState() {
IdleStateForTesting() = previous_state_;
}
} // namespace ui