| Index: content/browser/wake_lock/lock.h
|
| diff --git a/content/browser/wake_lock/lock.h b/content/browser/wake_lock/lock.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..fc7e85d9ae3040be50054ea082f5f6b41087d47e
|
| --- /dev/null
|
| +++ b/content/browser/wake_lock/lock.h
|
| @@ -0,0 +1,38 @@
|
| +// Copyright (c) 2014 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.
|
| +
|
| +#ifndef CONTENT_BROWSER_WAKE_LOCK_LOCK_H_
|
| +#define CONTENT_BROWSER_WAKE_LOCK_LOCK_H_
|
| +
|
| +#include "content/browser/power_save_blocker_impl.h"
|
| +
|
| +namespace content {
|
| +
|
| +class WakeLockManager;
|
| +
|
| +class Lock {
|
| + public:
|
| + Lock(int render_process_id, int routed_id);
|
| + ~Lock();
|
| +
|
| + void UnlockResource();
|
| +
|
| + int GetRenderProcessId() const { return render_process_id_; }
|
| + int GetRoutedId() const { return routed_id_; }
|
| +
|
| + friend class WakeLockManager;
|
| +
|
| + protected:
|
| + void LockResource();
|
| + void ForceLockResource();
|
| + void ForceUnlockResource();
|
| +
|
| + int render_process_id_;
|
| + int routed_id_;
|
| + bool unlocked_force_;
|
| + scoped_ptr<PowerSaveBlocker> blocker_;
|
| +};
|
| +}
|
| +
|
| +#endif // CONTENT_BROWSER_WAKE_LOCK_LOCK_H_
|
|
|