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

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

Issue 13932020: Set the initial resolution of an RDP session to the client screen resolution if it is available. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: CR feedback #2 Created 7 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 | Annotate | Revision Log
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_IPC_DESKTOP_ENVIRONMENT_H_ 5 #ifndef REMOTING_HOST_IPC_DESKTOP_ENVIRONMENT_H_
6 #define REMOTING_HOST_IPC_DESKTOP_ENVIRONMENT_H_ 6 #define REMOTING_HOST_IPC_DESKTOP_ENVIRONMENT_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/callback_forward.h" 12 #include "base/callback_forward.h"
13 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "base/memory/weak_ptr.h" 15 #include "base/memory/weak_ptr.h"
16 #include "remoting/host/curtain_mode.h" 16 #include "remoting/host/curtain_mode.h"
17 #include "remoting/host/desktop_environment.h" 17 #include "remoting/host/desktop_environment.h"
18 #include "remoting/host/desktop_session_connector.h" 18 #include "remoting/host/desktop_session_connector.h"
19 19
20 namespace base { 20 namespace base {
21 class SingleThreadTaskRunner; 21 class SingleThreadTaskRunner;
22 } // base 22 } // base
23 23
24 namespace IPC { 24 namespace IPC {
25 class Sender; 25 class Sender;
26 } // namespace IPC 26 } // namespace IPC
27 27
28 namespace remoting { 28 namespace remoting {
29 29
30 class Capabilities;
30 class ClientSessionControl; 31 class ClientSessionControl;
31 class DesktopSessionProxy; 32 class DesktopSessionProxy;
32 class ScreenResolution; 33 class ScreenResolution;
33 34
34 // A variant of desktop environment integrating with the desktop by means of 35 // A variant of desktop environment integrating with the desktop by means of
35 // a helper process and talking to that process via IPC. 36 // a helper process and talking to that process via IPC.
36 class IpcDesktopEnvironment : public DesktopEnvironment { 37 class IpcDesktopEnvironment : public DesktopEnvironment {
37 public: 38 public:
38 // |desktop_session_connector| is used to bind DesktopSessionProxy to 39 // |desktop_session_connector| is used to bind DesktopSessionProxy to
39 // a desktop session, to be notified every time the desktop process is 40 // a desktop session, to be notified every time the desktop process is
40 // restarted. 41 // restarted.
41 IpcDesktopEnvironment( 42 IpcDesktopEnvironment(
42 scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner, 43 scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner,
43 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, 44 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner,
44 scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner, 45 scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner,
45 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner, 46 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner,
46 base::WeakPtr<ClientSessionControl> client_session_control, 47 base::WeakPtr<ClientSessionControl> client_session_control,
47 base::WeakPtr<DesktopSessionConnector> desktop_session_connector, 48 base::WeakPtr<DesktopSessionConnector> desktop_session_connector,
48 bool virtual_terminal); 49 bool virtual_terminal);
49 virtual ~IpcDesktopEnvironment(); 50 virtual ~IpcDesktopEnvironment();
50 51
51 // DesktopEnvironment implementation. 52 // DesktopEnvironment implementation.
52 virtual scoped_ptr<AudioCapturer> CreateAudioCapturer() OVERRIDE; 53 virtual scoped_ptr<AudioCapturer> CreateAudioCapturer() OVERRIDE;
53 virtual scoped_ptr<InputInjector> CreateInputInjector() OVERRIDE; 54 virtual scoped_ptr<InputInjector> CreateInputInjector() OVERRIDE;
54 virtual scoped_ptr<ScreenControls> CreateScreenControls() OVERRIDE; 55 virtual scoped_ptr<ScreenControls> CreateScreenControls() OVERRIDE;
55 virtual scoped_ptr<media::ScreenCapturer> CreateVideoCapturer() OVERRIDE; 56 virtual scoped_ptr<media::ScreenCapturer> CreateVideoCapturer() OVERRIDE;
57 virtual Capabilities GetCapabilities() const OVERRIDE;
58 virtual void SetCapabilities(const Capabilities& capabilities) OVERRIDE;
56 59
57 private: 60 private:
58 scoped_refptr<DesktopSessionProxy> desktop_session_proxy_; 61 scoped_refptr<DesktopSessionProxy> desktop_session_proxy_;
59 62
60 DISALLOW_COPY_AND_ASSIGN(IpcDesktopEnvironment); 63 DISALLOW_COPY_AND_ASSIGN(IpcDesktopEnvironment);
61 }; 64 };
62 65
63 // Used to create IpcDesktopEnvironment objects integrating with the desktop via 66 // Used to create IpcDesktopEnvironment objects integrating with the desktop via
64 // a helper process and talking to that process via IPC. 67 // a helper process and talking to that process via IPC.
65 class IpcDesktopEnvironmentFactory 68 class IpcDesktopEnvironmentFactory
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 // This gives us more than 67 years of unique IDs assuming a new ID is 135 // This gives us more than 67 years of unique IDs assuming a new ID is
133 // allocated every second. 136 // allocated every second.
134 int next_id_; 137 int next_id_;
135 138
136 DISALLOW_COPY_AND_ASSIGN(IpcDesktopEnvironmentFactory); 139 DISALLOW_COPY_AND_ASSIGN(IpcDesktopEnvironmentFactory);
137 }; 140 };
138 141
139 } // namespace remoting 142 } // namespace remoting
140 143
141 #endif // REMOTING_HOST_IPC_DESKTOP_ENVIRONMENT_H_ 144 #endif // REMOTING_HOST_IPC_DESKTOP_ENVIRONMENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698