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

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

Issue 11028128: [Chromoting] Request the daemon to open a terminal once a connection has been accepted. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 8 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 | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "remoting/host/ipc_desktop_environment.h"
6
7 #include "base/compiler_specific.h"
8 #include "base/logging.h"
9 #include "base/single_thread_task_runner.h"
10 #include "remoting/host/audio_capturer.h"
11 #include "remoting/host/client_session.h"
12 #include "remoting/host/desktop_session_connector.h"
13 #include "remoting/host/event_executor.h"
14 #include "remoting/host/video_frame_capturer.h"
15
16 namespace remoting {
17
18 IpcDesktopEnvironment::IpcDesktopEnvironment(
19 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner,
20 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner,
21 DesktopSessionConnector* desktop_session_connector,
22 ClientSession* client)
23 : DesktopEnvironment(
24 AudioCapturer::Create(),
25 EventExecutor::Create(input_task_runner, ui_task_runner),
26 scoped_ptr<VideoFrameCapturer>(VideoFrameCapturer::Create())),
27 desktop_session_connector_(desktop_session_connector),
28 client_(client),
29 connected_(false) {
30 }
31
32 void IpcDesktopEnvironment::Start(
33 scoped_ptr<protocol::ClipboardStub> client_clipboard) {
34 DCHECK(!connected_);
35
36 connected_ = true;
37 desktop_session_connector_->ConnectTerminal(this);
38
39 DesktopEnvironment::Start(client_clipboard.Pass());
40 }
41
42 void IpcDesktopEnvironment::DisconnectClient() {
43 client_->Disconnect();
44 }
45
46 IpcDesktopEnvironment::~IpcDesktopEnvironment() {
47 if (connected_) {
48 connected_ = false;
49 desktop_session_connector_->DisconnectTerminal(this);
50 }
51 }
52
53 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/ipc_desktop_environment.h ('k') | remoting/host/ipc_desktop_environment_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698