diff options
author | alexeypa@chromium.org <alexeypa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-18 04:38:56 +0000 |
---|---|---|
committer | alexeypa@chromium.org <alexeypa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-18 04:38:56 +0000 |
commit | 6f526ce0c021f9414024e78da36683a661971698 (patch) | |
tree | 0dc3fd4bfcc15fb2cd6335dca944a1dfad5d7af3 | |
parent | 802e8c8fb32ef2546b6f2d70a78813588efd4f29 (diff) | |
download | chromium_src-6f526ce0c021f9414024e78da36683a661971698.zip chromium_src-6f526ce0c021f9414024e78da36683a661971698.tar.gz chromium_src-6f526ce0c021f9414024e78da36683a661971698.tar.bz2 |
Pass the client resolutin updates to the daemon and desktop processes and create a desktop resizer in the desktop process.
BUG=196316
Review URL: https://chromiumcodereview.appspot.com/12678009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@188673 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | remoting/host/chromoting_messages.h | 14 | ||||
-rw-r--r-- | remoting/host/client_session.h | 1 | ||||
-rw-r--r-- | remoting/host/daemon_process.cc | 59 | ||||
-rw-r--r-- | remoting/host/daemon_process.h | 8 | ||||
-rw-r--r-- | remoting/host/daemon_process_unittest.cc | 3 | ||||
-rw-r--r-- | remoting/host/desktop_process_unittest.cc | 3 | ||||
-rw-r--r-- | remoting/host/desktop_session.h | 4 | ||||
-rw-r--r-- | remoting/host/desktop_session_agent.cc | 20 | ||||
-rw-r--r-- | remoting/host/desktop_session_agent.h | 12 | ||||
-rw-r--r-- | remoting/host/desktop_session_connector.h | 5 | ||||
-rw-r--r-- | remoting/host/desktop_session_proxy.cc | 23 | ||||
-rw-r--r-- | remoting/host/desktop_session_proxy.h | 8 | ||||
-rw-r--r-- | remoting/host/desktop_session_win.cc | 20 | ||||
-rw-r--r-- | remoting/host/ipc_desktop_environment.cc | 17 | ||||
-rw-r--r-- | remoting/host/ipc_desktop_environment.h | 3 | ||||
-rw-r--r-- | remoting/host/ipc_session_controller.cc | 2 |
16 files changed, 181 insertions, 21 deletions
diff --git a/remoting/host/chromoting_messages.h b/remoting/host/chromoting_messages.h index 9cfc3e5..164bbb3 100644 --- a/remoting/host/chromoting_messages.h +++ b/remoting/host/chromoting_messages.h @@ -81,6 +81,11 @@ IPC_MESSAGE_CONTROL3(ChromotingNetworkHostMsg_ConnectTerminal, IPC_MESSAGE_CONTROL1(ChromotingNetworkHostMsg_DisconnectTerminal, int /* terminal_id */) +// Changes the screen resolution in the given desktop session. +IPC_MESSAGE_CONTROL2(ChromotingNetworkDaemonMsg_SetScreenResolution, + int /* terminal_id */, + remoting::ScreenResolution /* resolution */) + // Serialized remoting::protocol::TransportRoute structure. IPC_STRUCT_BEGIN(SerializedTransportRoute) IPC_STRUCT_MEMBER(int, type) @@ -218,8 +223,9 @@ IPC_MESSAGE_CONTROL1(ChromotingDesktopNetworkMsg_AudioPacket, // Passes the client session data to the desktop session agent and starts it. // This must be the first message received from the host. -IPC_MESSAGE_CONTROL1(ChromotingNetworkDesktopMsg_StartSessionAgent, - std::string /* authenticated_jid */ ) +IPC_MESSAGE_CONTROL2(ChromotingNetworkDesktopMsg_StartSessionAgent, + std::string /* authenticated_jid */, + remoting::ScreenResolution /* resolution */) // Notifies the desktop process that the shared memory buffer has been mapped to // the memory of the network process and so it can be safely dropped by @@ -246,3 +252,7 @@ IPC_MESSAGE_CONTROL1(ChromotingNetworkDesktopMsg_InjectKeyEvent, // |serialized_event| is a serialized protocol::MouseEvent. IPC_MESSAGE_CONTROL1(ChromotingNetworkDesktopMsg_InjectMouseEvent, std::string /* serialized_event */ ) + +// Changes the screen resolution in the desktop session. +IPC_MESSAGE_CONTROL1(ChromotingNetworkDesktopMsg_SetScreenResolution, + remoting::ScreenResolution /* resolution */) diff --git a/remoting/host/client_session.h b/remoting/host/client_session.h index 966a1f8..8d46828 100644 --- a/remoting/host/client_session.h +++ b/remoting/host/client_session.h @@ -215,6 +215,7 @@ class ClientSession scoped_ptr<EventExecutor> event_executor_; + // Used to apply client-requested changes in screen resolution. scoped_ptr<SessionController> session_controller_; DISALLOW_COPY_AND_ASSIGN(ClientSession); diff --git a/remoting/host/daemon_process.cc b/remoting/host/daemon_process.cc index 9d2cdbc..50c1b45 100644 --- a/remoting/host/daemon_process.cc +++ b/remoting/host/daemon_process.cc @@ -94,6 +94,8 @@ bool DaemonProcess::OnMessageReceived(const IPC::Message& message) { CreateDesktopSession) IPC_MESSAGE_HANDLER(ChromotingNetworkHostMsg_DisconnectTerminal, CloseDesktopSession) + IPC_MESSAGE_HANDLER(ChromotingNetworkDaemonMsg_SetScreenResolution, + SetScreenResolution) IPC_MESSAGE_HANDLER(ChromotingNetworkDaemonMsg_AccessDenied, OnAccessDenied) IPC_MESSAGE_HANDLER(ChromotingNetworkDaemonMsg_ClientAuthenticated, @@ -127,11 +129,11 @@ void DaemonProcess::OnPermanentError() { void DaemonProcess::CloseDesktopSession(int terminal_id) { DCHECK(caller_task_runner()->BelongsToCurrentThread()); - // Validate the supplied terminal ID. An attempt to close a desktop session - // with an ID that couldn't possibly have been allocated is considered - // a protocol error and the network process will be restarted. - if (!IsTerminalIdKnown(terminal_id)) { - LOG(ERROR) << "An invalid terminal ID. terminal_id=" << terminal_id; + // Validate the supplied terminal ID. An attempt to use a desktop session ID + // that couldn't possibly have been allocated is considered a protocol error + // and the network process will be restarted. + if (!WasTerminalIdAllocated(terminal_id)) { + LOG(ERROR) << "Invalid terminal ID: " << terminal_id; CrashNetworkProcess(FROM_HERE); return; } @@ -177,8 +179,8 @@ void DaemonProcess::CreateDesktopSession(int terminal_id, // Validate the supplied terminal ID. An attempt to create a desktop session // with an ID that could possibly have been allocated already is considered // a protocol error and the network process will be restarted. - if (IsTerminalIdKnown(terminal_id)) { - LOG(ERROR) << "An invalid terminal ID. terminal_id=" << terminal_id; + if (WasTerminalIdAllocated(terminal_id)) { + LOG(ERROR) << "Invalid terminal ID: " << terminal_id; CrashNetworkProcess(FROM_HERE); return; } @@ -186,11 +188,10 @@ void DaemonProcess::CreateDesktopSession(int terminal_id, // Terminal IDs cannot be reused. Update the expected next terminal ID. next_terminal_id_ = std::max(next_terminal_id_, terminal_id + 1); - // Validate |resolution|. + // Validate |resolution| and restart the sender if it is not valid. if (!resolution.IsValid()) { LOG(ERROR) << "Invalid resolution specified: " << resolution; - SendToNetwork( - new ChromotingDaemonNetworkMsg_TerminalDisconnected(terminal_id)); + CrashNetworkProcess(FROM_HERE); return; } @@ -208,6 +209,42 @@ void DaemonProcess::CreateDesktopSession(int terminal_id, desktop_sessions_.push_back(session.release()); } +void DaemonProcess::SetScreenResolution(int terminal_id, + const ScreenResolution& resolution) { + DCHECK(caller_task_runner()->BelongsToCurrentThread()); + + // Validate the supplied terminal ID. An attempt to use a desktop session ID + // that couldn't possibly have been allocated is considered a protocol error + // and the network process will be restarted. + if (!WasTerminalIdAllocated(terminal_id)) { + LOG(ERROR) << "Invalid terminal ID: " << terminal_id; + CrashNetworkProcess(FROM_HERE); + return; + } + + // Validate |resolution| and restart the sender if it is not valid. + if (!resolution.IsValid()) { + LOG(ERROR) << "Invalid resolution specified: " << resolution; + CrashNetworkProcess(FROM_HERE); + return; + } + + DesktopSessionList::iterator i; + for (i = desktop_sessions_.begin(); i != desktop_sessions_.end(); ++i) { + if ((*i)->id() == terminal_id) { + break; + } + } + + // It is OK if the terminal ID wasn't found. There is a race between + // the network and daemon processes. Each frees its own resources first and + // notifies the other party if there was something to clean up. + if (i == desktop_sessions_.end()) + return; + + (*i)->SetScreenResolution(resolution); +} + void DaemonProcess::CrashNetworkProcess( const tracked_objects::Location& location) { DCHECK(caller_task_runner()->BelongsToCurrentThread()); @@ -240,7 +277,7 @@ void DaemonProcess::Initialize() { LaunchNetworkProcess(); } -bool DaemonProcess::IsTerminalIdKnown(int terminal_id) { +bool DaemonProcess::WasTerminalIdAllocated(int terminal_id) { return terminal_id < next_terminal_id_; } diff --git a/remoting/host/daemon_process.h b/remoting/host/daemon_process.h index 3276315..99ddb2a 100644 --- a/remoting/host/daemon_process.h +++ b/remoting/host/daemon_process.h @@ -97,15 +97,19 @@ class DaemonProcess const ScreenResolution& resolution, bool virtual_terminal); + // Changes the screen resolution of the desktop session identified by + // |terminal_id|. + void SetScreenResolution(int terminal_id, const ScreenResolution& resolution); + // Requests the network process to crash. void CrashNetworkProcess(const tracked_objects::Location& location); // Reads the host configuration and launches the network process. void Initialize(); - // Returns true if |terminal_id| is considered to be known. I.e. it is + // Returns true if |terminal_id| is in the range of allocated IDs. I.e. it is // less or equal to the highest ID we have seen so far. - bool IsTerminalIdKnown(int terminal_id); + bool WasTerminalIdAllocated(int terminal_id); // Handlers for the host status notifications received from the network // process. diff --git a/remoting/host/daemon_process_unittest.cc b/remoting/host/daemon_process_unittest.cc index 6856a0a..3f2181d 100644 --- a/remoting/host/daemon_process_unittest.cc +++ b/remoting/host/daemon_process_unittest.cc @@ -42,6 +42,9 @@ class FakeDesktopSession : public DesktopSession { FakeDesktopSession(DaemonProcess* daemon_process, int id); virtual ~FakeDesktopSession(); + virtual void SetScreenResolution( + const ScreenResolution& resolution) OVERRIDE {} + private: DISALLOW_COPY_AND_ASSIGN(FakeDesktopSession); }; diff --git a/remoting/host/desktop_process_unittest.cc b/remoting/host/desktop_process_unittest.cc index 026c9bc..f035b1b 100644 --- a/remoting/host/desktop_process_unittest.cc +++ b/remoting/host/desktop_process_unittest.cc @@ -22,6 +22,7 @@ #include "remoting/host/desktop_process.h" #include "remoting/host/host_exit_codes.h" #include "remoting/host/host_mock_objects.h" +#include "remoting/host/screen_resolution.h" #include "remoting/protocol/protocol_mock_objects.h" #include "testing/gmock_mutant.h" #include "testing/gmock/include/gmock/gmock.h" @@ -305,7 +306,7 @@ void DesktopProcessTest::SendStartSessionAgent() { // function call" warnings printed when DisconnectWindow::Show() and // DisconnectWindow::Hide() are called. network_channel_->Send(new ChromotingNetworkDesktopMsg_StartSessionAgent( - "user@domain/rest-of-jid")); + "user@domain/rest-of-jid", ScreenResolution())); } // Launches the desktop process and waits when it connects back. diff --git a/remoting/host/desktop_session.h b/remoting/host/desktop_session.h index 8d98e92..6250921 100644 --- a/remoting/host/desktop_session.h +++ b/remoting/host/desktop_session.h @@ -11,6 +11,7 @@ namespace remoting { class DaemonProcess; +class ScreenResolution; // Represents the desktop session for a connected terminal. Each desktop session // has a unique identifier used by cross-platform code to refer to it. @@ -18,6 +19,9 @@ class DesktopSession { public: virtual ~DesktopSession(); + // Changes the screen resolution of the desktop session. + virtual void SetScreenResolution(const ScreenResolution& resolution) = 0; + int id() const { return id_; } protected: diff --git a/remoting/host/desktop_session_agent.cc b/remoting/host/desktop_session_agent.cc index 1dc17ed..acb7a51 100644 --- a/remoting/host/desktop_session_agent.cc +++ b/remoting/host/desktop_session_agent.cc @@ -19,6 +19,8 @@ #include "remoting/host/event_executor.h" #include "remoting/host/local_input_monitor.h" #include "remoting/host/remote_input_filter.h" +#include "remoting/host/screen_resolution.h" +#include "remoting/host/session_controller.h" #include "remoting/proto/audio.pb.h" #include "remoting/proto/control.pb.h" #include "remoting/proto/event.pb.h" @@ -93,6 +95,8 @@ bool DesktopSessionAgent::OnMessageReceived(const IPC::Message& message) { OnInjectKeyEvent) IPC_MESSAGE_HANDLER(ChromotingNetworkDesktopMsg_InjectMouseEvent, OnInjectMouseEvent) + IPC_MESSAGE_HANDLER(ChromotingNetworkDesktopMsg_SetScreenResolution, + SetScreenResolution) IPC_MESSAGE_UNHANDLED(handled = false) IPC_END_MESSAGE_MAP() } else { @@ -169,7 +173,8 @@ void DesktopSessionAgent::ReleaseSharedBuffer( } void DesktopSessionAgent::OnStartSessionAgent( - const std::string& authenticated_jid) { + const std::string& authenticated_jid, + const ScreenResolution& resolution) { DCHECK(caller_task_runner()->BelongsToCurrentThread()); DCHECK(!started_); DCHECK(!audio_capturer_); @@ -185,6 +190,10 @@ void DesktopSessionAgent::OnStartSessionAgent( delegate_->desktop_environment_factory().Create(authenticated_jid, disconnect_session); + // Create the session controller and set the initial screen resolution. + session_controller_ = desktop_environment->CreateSessionController(); + SetScreenResolution(resolution); + // Create the event executor. event_executor_ = desktop_environment->CreateEventExecutor(input_task_runner(), @@ -328,6 +337,7 @@ void DesktopSessionAgent::Stop() { input_tracker_.reset(); event_executor_.reset(); + session_controller_.reset(); // Stop the audio capturer. audio_capture_task_runner()->PostTask( @@ -449,6 +459,14 @@ void DesktopSessionAgent::OnInjectMouseEvent( remote_input_filter_->InjectMouseEvent(event); } +void DesktopSessionAgent::SetScreenResolution( + const ScreenResolution& resolution) { + DCHECK(caller_task_runner()->BelongsToCurrentThread()); + + if (session_controller_ && resolution.IsValid()) + session_controller_->SetScreenResolution(resolution); +} + void DesktopSessionAgent::DisconnectSession() { SendToNetwork(new ChromotingDesktopNetworkMsg_DisconnectSession()); } diff --git a/remoting/host/desktop_session_agent.h b/remoting/host/desktop_session_agent.h index 804edbd..52874a7 100644 --- a/remoting/host/desktop_session_agent.h +++ b/remoting/host/desktop_session_agent.h @@ -38,6 +38,8 @@ class DisconnectWindow; class EventExecutor; class LocalInputMonitor; class RemoteInputFilter; +class ScreenResolution; +class SessionController; namespace protocol { class InputEventTracker; @@ -122,7 +124,8 @@ class DesktopSessionAgent scoped_ptr<IPC::ChannelProxy>* server_out) = 0; // Handles StartSessionAgent request from the client. - void OnStartSessionAgent(const std::string& authenticated_jid); + void OnStartSessionAgent(const std::string& authenticated_jid, + const ScreenResolution& resolution); // Handles CaptureFrame requests from the client. void OnCaptureFrame(); @@ -138,6 +141,10 @@ class DesktopSessionAgent void OnInjectKeyEvent(const std::string& serialized_event); void OnInjectMouseEvent(const std::string& serialized_event); + // Handles ChromotingNetworkDesktopMsg_SetScreenResolution request from + // the client. + void SetScreenResolution(const ScreenResolution& resolution); + // Sends DisconnectSession request to the host. void DisconnectSession(); @@ -222,6 +229,9 @@ class DesktopSessionAgent // Filter used to disable remote inputs during local input activity. scoped_ptr<RemoteInputFilter> remote_input_filter_; + // Used to apply client-requested changes in screen resolution. + scoped_ptr<SessionController> session_controller_; + // IPC channel connecting the desktop process with the network process. scoped_ptr<IPC::ChannelProxy> network_channel_; diff --git a/remoting/host/desktop_session_connector.h b/remoting/host/desktop_session_connector.h index 65887817..dcf2b64 100644 --- a/remoting/host/desktop_session_connector.h +++ b/remoting/host/desktop_session_connector.h @@ -35,6 +35,11 @@ class DesktopSessionConnector { virtual void DisconnectTerminal( DesktopSessionProxy* desktop_session_proxy) = 0; + // Changes the screen resolution of the desktop session. + virtual void SetScreenResolution( + DesktopSessionProxy* desktop_session_proxy, + const ScreenResolution& resolution) = 0; + // Notifies the network process that |terminal_id| is now attached to // a desktop integration process. |desktop_process| specifies the process // handle. |desktop_pipe| is the client end of the pipe opened by the desktop diff --git a/remoting/host/desktop_session_proxy.cc b/remoting/host/desktop_session_proxy.cc index 5baa69d..b4ed6f7 100644 --- a/remoting/host/desktop_session_proxy.cc +++ b/remoting/host/desktop_session_proxy.cc @@ -19,7 +19,6 @@ #include "remoting/host/ipc_event_executor.h" #include "remoting/host/ipc_session_controller.h" #include "remoting/host/ipc_video_frame_capturer.h" -#include "remoting/host/screen_resolution.h" #include "remoting/host/session_controller.h" #include "remoting/proto/audio.pb.h" #include "remoting/proto/control.pb.h" @@ -156,7 +155,9 @@ bool DesktopSessionProxy::AttachToDesktop( // Pass ID of the client (which is authenticated at this point) to the desktop // session agent and start the agent. - SendToDesktop(new ChromotingNetworkDesktopMsg_StartSessionAgent(client_jid_)); + SendToDesktop(new ChromotingNetworkDesktopMsg_StartSessionAgent( + client_jid_, screen_resolution_)); + return true; } @@ -280,6 +281,24 @@ void DesktopSessionProxy::StartEventExecutor( client_clipboard_ = client_clipboard.Pass(); } +void DesktopSessionProxy::SetScreenResolution( + const ScreenResolution& resolution) { + DCHECK(caller_task_runner_->BelongsToCurrentThread()); + + screen_resolution_ = resolution; + if (!screen_resolution_.IsValid()) + return; + + // Pass the client's resolution to both daemon and desktop session agent. + // Depending on the session kind the screen resolution ccan be set by either + // the daemon (for example RDP sessions on Windows) or by the desktop session + // agent (when sharing the physical console). + if (desktop_session_connector_) + desktop_session_connector_->SetScreenResolution(this, resolution); + SendToDesktop( + new ChromotingNetworkDesktopMsg_SetScreenResolution(resolution)); +} + void DesktopSessionProxy::ConnectToDesktopSession( base::WeakPtr<DesktopSessionConnector> desktop_session_connector, bool virtual_terminal) { diff --git a/remoting/host/desktop_session_proxy.h b/remoting/host/desktop_session_proxy.h index 7b15e41..750c191 100644 --- a/remoting/host/desktop_session_proxy.h +++ b/remoting/host/desktop_session_proxy.h @@ -19,6 +19,7 @@ #include "media/video/capture/screen/shared_buffer.h" #include "remoting/host/audio_capturer.h" #include "remoting/host/desktop_environment.h" +#include "remoting/host/screen_resolution.h" #include "remoting/proto/event.pb.h" #include "remoting/protocol/clipboard_stub.h" #include "third_party/skia/include/core/SkRegion.h" @@ -121,6 +122,9 @@ class DesktopSessionProxy void InjectMouseEvent(const protocol::MouseEvent& event); void StartEventExecutor(scoped_ptr<protocol::ClipboardStub> client_clipboard); + // API used to implement the SessionController interface. + void SetScreenResolution(const ScreenResolution& resolution); + private: friend class base::DeleteHelper<DesktopSessionProxy>; friend struct DesktopSessionProxyTraits; @@ -203,6 +207,10 @@ class DesktopSessionProxy typedef std::map<int, scoped_refptr<media::SharedBuffer> > SharedBuffers; SharedBuffers shared_buffers_; + // Keeps the desired screen resolution so it can be passed to a newly attached + // desktop session agent. + ScreenResolution screen_resolution_; + DISALLOW_COPY_AND_ASSIGN(DesktopSessionProxy); }; diff --git a/remoting/host/desktop_session_win.cc b/remoting/host/desktop_session_win.cc index 3ef448e..3c3dd638 100644 --- a/remoting/host/desktop_session_win.cc +++ b/remoting/host/desktop_session_win.cc @@ -88,6 +88,9 @@ class ConsoleSession : public DesktopSessionWin { virtual ~ConsoleSession(); protected: + // DesktopSession overrides. + virtual void SetScreenResolution(const ScreenResolution& resolution) OVERRIDE; + // DesktopSessionWin overrides. virtual void InjectSas() OVERRIDE; @@ -120,6 +123,9 @@ class RdpSession : public DesktopSessionWin { void OnRdpClosed(); protected: + // DesktopSession overrides. + virtual void SetScreenResolution(const ScreenResolution& resolution) OVERRIDE; + // DesktopSessionWin overrides. virtual void InjectSas() OVERRIDE; @@ -174,6 +180,12 @@ ConsoleSession::ConsoleSession( ConsoleSession::~ConsoleSession() { } +void ConsoleSession::SetScreenResolution(const ScreenResolution& resolution) { + // Do nothing. The screen resolution of the console session is controlled by + // the DesktopSessionAgent instance running in that session. + DCHECK(caller_task_runner()->BelongsToCurrentThread()); +} + void ConsoleSession::InjectSas() { if (!sas_injector_) sas_injector_ = SasInjector::Create(); @@ -250,6 +262,14 @@ void RdpSession::OnRdpClosed() { OnPermanentError(); } +void RdpSession::SetScreenResolution(const ScreenResolution& resolution) { + DCHECK(caller_task_runner()->BelongsToCurrentThread()); + + // TODO(alexeypa): implement resize-to-client for RDP sessions here. + // See http://crbug.com/137696. + NOTIMPLEMENTED(); +} + void RdpSession::InjectSas() { DCHECK(caller_task_runner()->BelongsToCurrentThread()); diff --git a/remoting/host/ipc_desktop_environment.cc b/remoting/host/ipc_desktop_environment.cc index bbe93e3..427f3a1 100644 --- a/remoting/host/ipc_desktop_environment.cc +++ b/remoting/host/ipc_desktop_environment.cc @@ -148,6 +148,23 @@ void IpcDesktopEnvironmentFactory::DisconnectTerminal( } } +void IpcDesktopEnvironmentFactory::SetScreenResolution( + DesktopSessionProxy* desktop_session_proxy, + const ScreenResolution& resolution) { + DCHECK(caller_task_runner_->BelongsToCurrentThread()); + + ActiveConnectionsList::iterator i; + for (i = active_connections_.begin(); i != active_connections_.end(); ++i) { + if (i->second == desktop_session_proxy) + break; + } + + if (i != active_connections_.end()) { + daemon_channel_->Send(new ChromotingNetworkDaemonMsg_SetScreenResolution( + i->first, resolution)); + } +} + void IpcDesktopEnvironmentFactory::OnDesktopSessionAgentAttached( int terminal_id, base::ProcessHandle desktop_process, diff --git a/remoting/host/ipc_desktop_environment.h b/remoting/host/ipc_desktop_environment.h index a07efd7..428613c 100644 --- a/remoting/host/ipc_desktop_environment.h +++ b/remoting/host/ipc_desktop_environment.h @@ -97,6 +97,9 @@ class IpcDesktopEnvironmentFactory bool virtual_terminal) OVERRIDE; virtual void DisconnectTerminal( DesktopSessionProxy* desktop_session_proxy) OVERRIDE; + virtual void SetScreenResolution( + DesktopSessionProxy* desktop_session_proxy, + const ScreenResolution& resolution) OVERRIDE; virtual void OnDesktopSessionAgentAttached( int terminal_id, base::ProcessHandle desktop_process, diff --git a/remoting/host/ipc_session_controller.cc b/remoting/host/ipc_session_controller.cc index 30f51e7..d82be60 100644 --- a/remoting/host/ipc_session_controller.cc +++ b/remoting/host/ipc_session_controller.cc @@ -19,7 +19,7 @@ IpcSessionController::~IpcSessionController() { void IpcSessionController::SetScreenResolution( const ScreenResolution& resolution) { - NOTIMPLEMENTED(); + desktop_session_proxy_->SetScreenResolution(resolution); } } // namespace remoting |