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

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

Issue 1864213002: Convert //remoting to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mac IWYU Created 4 years, 8 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
« no previous file with comments | « remoting/host/desktop_environment.h ('k') | remoting/host/desktop_process.cc » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_DESKTOP_PROCESS_H_ 5 #ifndef REMOTING_HOST_DESKTOP_PROCESS_H_
6 #define REMOTING_HOST_DESKTOP_PROCESS_H_ 6 #define REMOTING_HOST_DESKTOP_PROCESS_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory>
10 #include <string> 11 #include <string>
11 12
12 #include "base/callback_forward.h" 13 #include "base/callback_forward.h"
13 #include "base/compiler_specific.h" 14 #include "base/compiler_specific.h"
14 #include "base/macros.h" 15 #include "base/macros.h"
15 #include "base/memory/ref_counted.h" 16 #include "base/memory/ref_counted.h"
16 #include "base/memory/scoped_ptr.h"
17 #include "base/memory/weak_ptr.h" 17 #include "base/memory/weak_ptr.h"
18 #include "ipc/ipc_listener.h" 18 #include "ipc/ipc_listener.h"
19 #include "remoting/host/desktop_session_agent.h" 19 #include "remoting/host/desktop_session_agent.h"
20 20
21 namespace IPC { 21 namespace IPC {
22 class ChannelProxy; 22 class ChannelProxy;
23 } // namespace IPC 23 } // namespace IPC
24 24
25 namespace remoting { 25 namespace remoting {
26 26
(...skipping 19 matching lines...) Expand all
46 // IPC::Listener implementation. 46 // IPC::Listener implementation.
47 bool OnMessageReceived(const IPC::Message& message) override; 47 bool OnMessageReceived(const IPC::Message& message) override;
48 void OnChannelConnected(int32_t peer_pid) override; 48 void OnChannelConnected(int32_t peer_pid) override;
49 void OnChannelError() override; 49 void OnChannelError() override;
50 50
51 // Injects Secure Attention Sequence. 51 // Injects Secure Attention Sequence.
52 void InjectSas(); 52 void InjectSas();
53 53
54 // Creates the desktop agent and required threads and IPC channels. Returns 54 // Creates the desktop agent and required threads and IPC channels. Returns
55 // true on success. 55 // true on success.
56 bool Start(scoped_ptr<DesktopEnvironmentFactory> desktop_environment_factory); 56 bool Start(
57 std::unique_ptr<DesktopEnvironmentFactory> desktop_environment_factory);
57 58
58 private: 59 private:
59 // Crashes the process in response to a daemon's request. The daemon passes 60 // Crashes the process in response to a daemon's request. The daemon passes
60 // the location of the code that detected the fatal error resulted in this 61 // the location of the code that detected the fatal error resulted in this
61 // request. See the declaration of ChromotingDaemonMsg_Crash message. 62 // request. See the declaration of ChromotingDaemonMsg_Crash message.
62 void OnCrash(const std::string& function_name, 63 void OnCrash(const std::string& function_name,
63 const std::string& file_name, 64 const std::string& file_name,
64 const int& line_number); 65 const int& line_number);
65 66
66 // Task runner on which public methods of this class should be called. 67 // Task runner on which public methods of this class should be called.
67 scoped_refptr<AutoThreadTaskRunner> caller_task_runner_; 68 scoped_refptr<AutoThreadTaskRunner> caller_task_runner_;
68 69
69 // Used to run input-related tasks. 70 // Used to run input-related tasks.
70 scoped_refptr<AutoThreadTaskRunner> input_task_runner_; 71 scoped_refptr<AutoThreadTaskRunner> input_task_runner_;
71 72
72 // Factory used to create integration components for use by |desktop_agent_|. 73 // Factory used to create integration components for use by |desktop_agent_|.
73 scoped_ptr<DesktopEnvironmentFactory> desktop_environment_factory_; 74 std::unique_ptr<DesktopEnvironmentFactory> desktop_environment_factory_;
74 75
75 // Name of the IPC channel connecting the desktop process with the daemon 76 // Name of the IPC channel connecting the desktop process with the daemon
76 // process. 77 // process.
77 std::string daemon_channel_name_; 78 std::string daemon_channel_name_;
78 79
79 // IPC channel connecting the desktop process with the daemon process. 80 // IPC channel connecting the desktop process with the daemon process.
80 scoped_ptr<IPC::ChannelProxy> daemon_channel_; 81 std::unique_ptr<IPC::ChannelProxy> daemon_channel_;
81 82
82 // Provides screen/audio capturing and input injection services for 83 // Provides screen/audio capturing and input injection services for
83 // the network process. 84 // the network process.
84 scoped_refptr<DesktopSessionAgent> desktop_agent_; 85 scoped_refptr<DesktopSessionAgent> desktop_agent_;
85 86
86 DISALLOW_COPY_AND_ASSIGN(DesktopProcess); 87 DISALLOW_COPY_AND_ASSIGN(DesktopProcess);
87 }; 88 };
88 89
89 } // namespace remoting 90 } // namespace remoting
90 91
91 #endif // REMOTING_HOST_DESKTOP_PROCESS_H_ 92 #endif // REMOTING_HOST_DESKTOP_PROCESS_H_
OLDNEW
« no previous file with comments | « remoting/host/desktop_environment.h ('k') | remoting/host/desktop_process.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698