| Index: content/browser/wake_lock/wake_lock_state.cc
|
| diff --git a/content/browser/wake_lock/wake_lock_state.cc b/content/browser/wake_lock/wake_lock_state.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..1f645b1b83e250beaf2992368277d7a87f422534
|
| --- /dev/null
|
| +++ b/content/browser/wake_lock/wake_lock_state.cc
|
| @@ -0,0 +1,31 @@
|
| +// Copyright 2015 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "content/browser/wake_lock/wake_lock_state.h"
|
| +
|
| +namespace content {
|
| +
|
| +WakeLockState::WakeLockState() {
|
| +}
|
| +
|
| +WakeLockState::~WakeLockState() {
|
| +}
|
| +
|
| +void WakeLockState::AddFrame(const RenderFrameHost* frame) {
|
| + frames_requesting_lock_.insert(frame);
|
| +}
|
| +
|
| +void WakeLockState::RemoveFrame(const RenderFrameHost* frame) {
|
| + frames_requesting_lock_.erase(frame);
|
| +}
|
| +
|
| +void WakeLockState::RemoveAllFrames() {
|
| + frames_requesting_lock_.clear();
|
| +}
|
| +
|
| +bool WakeLockState::HasFrame() const {
|
| + return !frames_requesting_lock_.empty();
|
| +}
|
| +
|
| +} // namespace content
|
|
|