| Index: content/browser/power_save_blocker_impl.h
|
| diff --git a/content/browser/power_save_blocker.h b/content/browser/power_save_blocker_impl.h
|
| similarity index 32%
|
| copy from content/browser/power_save_blocker.h
|
| copy to content/browser/power_save_blocker_impl.h
|
| index 53e5418078e442e01b16f9c620634e56b413b19f..fd0e63ad5bc094378b2f41a1010e1c2940ff93c6 100644
|
| --- a/content/browser/power_save_blocker.h
|
| +++ b/content/browser/power_save_blocker_impl.h
|
| @@ -1,43 +1,19 @@
|
| -// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
| +// Copyright (c) 2013 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_POWER_SAVE_BLOCKER_H_
|
| -#define CONTENT_BROWSER_POWER_SAVE_BLOCKER_H_
|
| +#ifndef CONTENT_BROWSER_POWER_SAVE_BLOCKER_IMPL_H_
|
| +#define CONTENT_BROWSER_POWER_SAVE_BLOCKER_IMPL_H_
|
|
|
| -#include <string>
|
| -#include <vector>
|
| -
|
| -#include "base/basictypes.h"
|
| #include "base/memory/ref_counted.h"
|
| -#include "content/common/content_export.h"
|
| +#include "content/public/browser/power_save_blocker.h"
|
|
|
| namespace content {
|
|
|
| -// 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 CONTENT_EXPORT PowerSaveBlocker {
|
| +class PowerSaveBlockerImpl : public 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,
|
| - };
|
| -
|
| - // Pass in the type of power save blocking desired. If multiple types of
|
| - // blocking are desired, instantiate one PowerSaveBlocker for each type.
|
| - // |reason| may be provided to the underlying system APIs on some platforms.
|
| - PowerSaveBlocker(PowerSaveBlockerType type, const std::string& reason);
|
| - ~PowerSaveBlocker();
|
| + PowerSaveBlockerImpl(PowerSaveBlockerType type, const std::string& reason);
|
| + virtual ~PowerSaveBlockerImpl();
|
|
|
| private:
|
| class Delegate;
|
| @@ -54,9 +30,9 @@ class CONTENT_EXPORT PowerSaveBlocker {
|
| // };
|
| scoped_refptr<Delegate> delegate_;
|
|
|
| - DISALLOW_COPY_AND_ASSIGN(PowerSaveBlocker);
|
| + DISALLOW_COPY_AND_ASSIGN(PowerSaveBlockerImpl);
|
| };
|
|
|
| } // namespace content
|
|
|
| -#endif // CONTENT_BROWSER_POWER_SAVE_BLOCKER_H_
|
| +#endif // CONTENT_BROWSER_POWER_SAVE_BLOCKER_IMPL_H_
|
|
|