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

Side by Side Diff: remoting/host/host_power_save_blocker.h

Issue 2538183002: remoting: Cleanup class/struct fwd declarations (Closed)
Patch Set: Created 4 years 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
« no previous file with comments | « remoting/host/host_mock_objects.h ('k') | remoting/host/host_status_observer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 REMOTING_HOST_HOST_POWER_SAVER_BLOCKER_H_ 5 #ifndef REMOTING_HOST_HOST_POWER_SAVER_BLOCKER_H_
6 #define REMOTING_HOST_HOST_POWER_SAVER_BLOCKER_H_ 6 #define REMOTING_HOST_HOST_POWER_SAVER_BLOCKER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
13 #include "device/power_save_blocker/power_save_blocker.h" 13 #include "device/power_save_blocker/power_save_blocker.h"
14 #include "remoting/host/host_status_observer.h" 14 #include "remoting/host/host_status_observer.h"
15 15
16 namespace base { 16 namespace base {
17 17
18 class SingleThreadTaskRunner; 18 class SingleThreadTaskRunner;
19 19
20 } // namespace base 20 } // namespace base
21 21
22 namespace remoting { 22 namespace remoting {
23 23
24 class AutoThreadTaskRunner;
25 class HostStatusMonitor; 24 class HostStatusMonitor;
26 25
27 // A HostStatusObserver to block screen saver from taking effect during the 26 // A HostStatusObserver to block screen saver from taking effect during the
28 // lifetime of a remoting connection. 27 // lifetime of a remoting connection.
29 class HostPowerSaveBlocker : public HostStatusObserver { 28 class HostPowerSaveBlocker : public HostStatusObserver {
30 public: 29 public:
31 HostPowerSaveBlocker( 30 HostPowerSaveBlocker(
32 base::WeakPtr<HostStatusMonitor> monitor, 31 base::WeakPtr<HostStatusMonitor> monitor,
33 const scoped_refptr<base::SingleThreadTaskRunner>& ui_task_runner, 32 const scoped_refptr<base::SingleThreadTaskRunner>& ui_task_runner,
34 const scoped_refptr<base::SingleThreadTaskRunner>& file_task_runner); 33 const scoped_refptr<base::SingleThreadTaskRunner>& file_task_runner);
35 34
36 ~HostPowerSaveBlocker() override; 35 ~HostPowerSaveBlocker() override;
37 36
38 void OnClientConnected(const std::string& jid) override; 37 void OnClientConnected(const std::string& jid) override;
39 void OnClientDisconnected(const std::string& jid) override; 38 void OnClientDisconnected(const std::string& jid) override;
40 39
41 private: 40 private:
42 friend class HostPowerSaveBlockerTest; 41 friend class HostPowerSaveBlockerTest;
43 42
44 base::WeakPtr<HostStatusMonitor> monitor_; 43 base::WeakPtr<HostStatusMonitor> monitor_;
45 scoped_refptr<base::SequencedTaskRunner> ui_task_runner_; 44 scoped_refptr<base::SequencedTaskRunner> ui_task_runner_;
46 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner_; 45 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner_;
47 std::unique_ptr<device::PowerSaveBlocker> blocker_; 46 std::unique_ptr<device::PowerSaveBlocker> blocker_;
48 }; 47 };
49 48
50 } // namespace remoting 49 } // namespace remoting
51 50
52 #endif // REMOTING_HOST_HOST_POWER_SAVER_BLOCKER_H_ 51 #endif // REMOTING_HOST_HOST_POWER_SAVER_BLOCKER_H_
OLDNEW
« no previous file with comments | « remoting/host/host_mock_objects.h ('k') | remoting/host/host_status_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698