Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(234)

Side by Side Diff: content/browser/power_save_blocker_impl.h

Issue 667943003: Standardize usage of virtual/override/final in content/browser/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_POWER_SAVE_BLOCKER_IMPL_H_ 5 #ifndef CONTENT_BROWSER_POWER_SAVE_BLOCKER_IMPL_H_
6 #define CONTENT_BROWSER_POWER_SAVE_BLOCKER_IMPL_H_ 6 #define CONTENT_BROWSER_POWER_SAVE_BLOCKER_IMPL_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "content/public/browser/power_save_blocker.h" 9 #include "content/public/browser/power_save_blocker.h"
10 #include "ui/gfx/native_widget_types.h" 10 #include "ui/gfx/native_widget_types.h"
11 11
12 namespace content { 12 namespace content {
13 13
14 class PowerSaveBlockerImpl : public PowerSaveBlocker { 14 class PowerSaveBlockerImpl : public PowerSaveBlocker {
15 public: 15 public:
16 PowerSaveBlockerImpl(PowerSaveBlockerType type, const std::string& reason); 16 PowerSaveBlockerImpl(PowerSaveBlockerType type, const std::string& reason);
17 virtual ~PowerSaveBlockerImpl(); 17 ~PowerSaveBlockerImpl() override;
18 18
19 #if defined(OS_ANDROID) 19 #if defined(OS_ANDROID)
20 // In Android platform, the kPowerSaveBlockPreventDisplaySleep type of 20 // In Android platform, the kPowerSaveBlockPreventDisplaySleep type of
21 // PowerSaveBlocker should associated with the ViewAndroid, 21 // PowerSaveBlocker should associated with the ViewAndroid,
22 // so the blocker could be removed by platform if the view isn't visble 22 // so the blocker could be removed by platform if the view isn't visble
23 void InitDisplaySleepBlocker(gfx::NativeView view_android); 23 void InitDisplaySleepBlocker(gfx::NativeView view_android);
24 #endif 24 #endif
25 25
26 private: 26 private:
27 class Delegate; 27 class Delegate;
28 28
29 // Implementations of this class may need a second object with different 29 // Implementations of this class may need a second object with different
30 // lifetime than the RAII container, or additional storage. This member is 30 // lifetime than the RAII container, or additional storage. This member is
31 // here for that purpose. If not used, just define the class as an empty 31 // here for that purpose. If not used, just define the class as an empty
32 // RefCounted (or RefCountedThreadSafe) like so to make it compile: 32 // RefCounted (or RefCountedThreadSafe) like so to make it compile:
33 // class PowerSaveBlocker::Delegate 33 // class PowerSaveBlocker::Delegate
34 // : public base::RefCounted<PowerSaveBlocker::Delegate> { 34 // : public base::RefCounted<PowerSaveBlocker::Delegate> {
35 // private: 35 // private:
36 // friend class base::RefCounted<Delegate>; 36 // friend class base::RefCounted<Delegate>;
37 // ~Delegate() {} 37 // ~Delegate() {}
38 // }; 38 // };
39 scoped_refptr<Delegate> delegate_; 39 scoped_refptr<Delegate> delegate_;
40 40
41 DISALLOW_COPY_AND_ASSIGN(PowerSaveBlockerImpl); 41 DISALLOW_COPY_AND_ASSIGN(PowerSaveBlockerImpl);
42 }; 42 };
43 43
44 } // namespace content 44 } // namespace content
45 45
46 #endif // CONTENT_BROWSER_POWER_SAVE_BLOCKER_IMPL_H_ 46 #endif // CONTENT_BROWSER_POWER_SAVE_BLOCKER_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/power_profiler/power_profiler_service_unittest.cc ('k') | content/browser/ppapi_plugin_process_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698