| Index: device/power_save_blocker/power_save_blocker.h
|
| diff --git a/device/power_save_blocker/power_save_blocker.h b/device/power_save_blocker/power_save_blocker.h
|
| deleted file mode 100644
|
| index 096d816035d4bbc7f1346a3e08cd8a19bcbb0d7f..0000000000000000000000000000000000000000
|
| --- a/device/power_save_blocker/power_save_blocker.h
|
| +++ /dev/null
|
| @@ -1,64 +0,0 @@
|
| -// Copyright (c) 2012 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 DEVICE_POWER_SAVE_BLOCKER_POWER_SAVE_BLOCKER_H_
|
| -#define DEVICE_POWER_SAVE_BLOCKER_POWER_SAVE_BLOCKER_H_
|
| -
|
| -#include <memory>
|
| -#include <string>
|
| -
|
| -#include "base/memory/ref_counted.h"
|
| -#include "base/sequenced_task_runner.h"
|
| -#include "base/single_thread_task_runner.h"
|
| -#include "device/power_save_blocker/power_save_blocker_export.h"
|
| -
|
| -namespace device {
|
| -
|
| -// A RAII-style class to block the system from entering low-power (sleep) mode.
|
| -// This class is thread-safe; it may be constructed and deleted on any thread.
|
| -class DEVICE_POWER_SAVE_BLOCKER_EXPORT PowerSaveBlocker {
|
| - public:
|
| - enum PowerSaveBlockerType {
|
| - // Prevent the application from being suspended. On some platforms, apps may
|
| - // be suspended when they are not visible to the user. This type of block
|
| - // requests that the app continue to run in that case, and on all platforms
|
| - // prevents the system from sleeping.
|
| - // Example use cases: downloading a file, playing audio.
|
| - kPowerSaveBlockPreventAppSuspension,
|
| -
|
| - // Prevent the display from going to sleep. This also has the side effect of
|
| - // preventing the system from sleeping, but does not necessarily prevent the
|
| - // app from being suspended on some platforms if the user hides it.
|
| - // Example use case: playing video.
|
| - kPowerSaveBlockPreventDisplaySleep,
|
| - };
|
| -
|
| - // Reasons why power-saving features may be blocked.
|
| - enum Reason {
|
| - // Audio is being played.
|
| - kReasonAudioPlayback,
|
| - // Video is being played.
|
| - kReasonVideoPlayback,
|
| - // Power-saving is blocked for some other reason.
|
| - kReasonOther,
|
| - };
|
| -
|
| - virtual ~PowerSaveBlocker() = 0;
|
| -
|
| - // Pass in the type of power save blocking desired. If multiple types of
|
| - // blocking are desired, instantiate one PowerSaveBlocker for each type.
|
| - // |reason| and |description| (a more-verbose, human-readable justification of
|
| - // the blocking) may be provided to the underlying system APIs on some
|
| - // platforms.
|
| - static std::unique_ptr<PowerSaveBlocker> CreateWithTaskRunners(
|
| - PowerSaveBlockerType type,
|
| - Reason reason,
|
| - const std::string& description,
|
| - scoped_refptr<base::SequencedTaskRunner> ui_task_runner,
|
| - scoped_refptr<base::SingleThreadTaskRunner> file_task_runner);
|
| -};
|
| -
|
| -} // namespace device
|
| -
|
| -#endif // DEVICE_POWER_SAVE_BLOCKER_POWER_SAVE_BLOCKER_H_
|
|
|