Broke ContentSettingBubbleModelTest.Plugins on Android.
[chromium-blink-merge.git] / content / browser / power_save_blocker_impl.h
blobfd0e63ad5bc094378b2f41a1010e1c2940ff93c6
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"
11 namespace content {
13 class PowerSaveBlockerImpl : public PowerSaveBlocker {
14 public:
15 PowerSaveBlockerImpl(PowerSaveBlockerType type, const std::string& reason);
16 virtual ~PowerSaveBlockerImpl();
18 private:
19 class Delegate;
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> {
27 // private:
28 // friend class base::RefCounted<Delegate>;
29 // ~Delegate() {}
30 // };
31 scoped_refptr<Delegate> delegate_;
33 DISALLOW_COPY_AND_ASSIGN(PowerSaveBlockerImpl);
36 } // namespace content
38 #endif // CONTENT_BROWSER_POWER_SAVE_BLOCKER_IMPL_H_