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

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: 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/daemon_sender.h"
11 #include "remoting/host/event_executor.h"
12 #include "remoting/host/video_frame_capturer.h"
13
14 namespace remoting {
15
16 IpcDesktopEnvironment::IpcDesktopEnvironment(
17 scoped_ptr<AudioCapturer> audio_capturer,
18 scoped_ptr<EventExecutor> event_executor,
19 scoped_ptr<VideoFrameCapturer> video_capturer,
20 DaemonSender* daemon_sender)
21 : DesktopEnvironment(audio_capturer.Pass(),
22 event_executor.Pass(),
23 video_capturer.Pass()),
24 daemon_sender_(daemon_sender),
25 terminal_opened_(false) {
26 }
27
28 void IpcDesktopEnvironment::Start(
29 scoped_ptr<protocol::ClipboardStub> client_clipboard) {
30 DCHECK(!terminal_opened_);
31
32 terminal_opened_ = true;
33 daemon_sender_->OpenTerminal(this);
34
35 DesktopEnvironment::Start(client_clipboard.Pass());
36 }
37
38 IpcDesktopEnvironment::~IpcDesktopEnvironment() {
39 if (terminal_opened_)
40 daemon_sender_->CloseTerminal(this);
41 }
42
43 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698