1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CONTENT_BROWSER_POWER_SAVE_BLOCKER_IMPL_H_
6 #define CONTENT_BROWSER_POWER_SAVE_BLOCKER_IMPL_H_
8 #include "base/memory/ref_counted.h"
9 #include "content/public/browser/power_save_blocker.h"
13 class PowerSaveBlockerImpl
: public PowerSaveBlocker
{
15 PowerSaveBlockerImpl(PowerSaveBlockerType type
, const std::string
& reason
);
16 virtual ~PowerSaveBlockerImpl();
21 // Implementations of this class may need a second object with different
22 // lifetime than the RAII container, or additional storage. This member is
23 // here for that purpose. If not used, just define the class as an empty
24 // RefCounted (or RefCountedThreadSafe) like so to make it compile:
25 // class PowerSaveBlocker::Delegate
26 // : public base::RefCounted<PowerSaveBlocker::Delegate> {
28 // friend class base::RefCounted<Delegate>;
31 scoped_refptr
<Delegate
> delegate_
;
33 DISALLOW_COPY_AND_ASSIGN(PowerSaveBlockerImpl
);
36 } // namespace content
38 #endif // CONTENT_BROWSER_POWER_SAVE_BLOCKER_IMPL_H_