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

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: CR feeback and rebased on top of https://chromiumcodereview.appspot.com/11017065/ 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 "remoting/host/audio_capturer.h"
10 #include "remoting/host/chromoting_host.h"
11 #include "remoting/host/desktop_session_connector.h"
12 #include "remoting/host/event_executor.h"
13 #include "remoting/host/video_frame_capturer.h"
14
15 namespace remoting {
16
17 IpcDesktopEnvironment::IpcDesktopEnvironment(
18 scoped_ptr<AudioCapturer> audio_capturer,
19 scoped_ptr<EventExecutor> event_executor,
20 scoped_ptr<VideoFrameCapturer> video_capturer,
21 DesktopSessionConnector* desktop_session_connector,
22 scoped_refptr<ChromotingHost> host)
23 : DesktopEnvironment(audio_capturer.Pass(),
24 event_executor.Pass(),
25 video_capturer.Pass()),
26 connected_(false),
27 desktop_session_connector_(desktop_session_connector),
28 host_(host) {
29 }
30
31 void IpcDesktopEnvironment::Start(
32 scoped_ptr<protocol::ClipboardStub> client_clipboard) {
33 DCHECK(!connected_);
34
35 connected_ = true;
36 desktop_session_connector_->ConnectTerminal(this);
37
38 DesktopEnvironment::Start(client_clipboard.Pass());
39 }
40
41 void IpcDesktopEnvironment::DisconnectClient() {
42 host_->DisconnectClient(this);
43 }
44
45 IpcDesktopEnvironment::~IpcDesktopEnvironment() {
46 if (connected_) {
47 connected_ = false;
48 desktop_session_connector_->DisconnectTerminal(this);
49 }
50 }
51
52 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698