| Index: remoting/host/ipc_desktop_environment.cc
|
| diff --git a/remoting/host/ipc_desktop_environment.cc b/remoting/host/ipc_desktop_environment.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..3ae9c9cd2abf020db49964092213db8d4c5bad7a
|
| --- /dev/null
|
| +++ b/remoting/host/ipc_desktop_environment.cc
|
| @@ -0,0 +1,43 @@
|
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "remoting/host/ipc_desktop_environment.h"
|
| +
|
| +#include "base/compiler_specific.h"
|
| +#include "base/logging.h"
|
| +#include "remoting/host/audio_capturer.h"
|
| +#include "remoting/host/daemon_sender.h"
|
| +#include "remoting/host/event_executor.h"
|
| +#include "remoting/host/video_frame_capturer.h"
|
| +
|
| +namespace remoting {
|
| +
|
| +IpcDesktopEnvironment::IpcDesktopEnvironment(
|
| + scoped_ptr<AudioCapturer> audio_capturer,
|
| + scoped_ptr<EventExecutor> event_executor,
|
| + scoped_ptr<VideoFrameCapturer> video_capturer,
|
| + DaemonSender* daemon_sender)
|
| + : DesktopEnvironment(audio_capturer.Pass(),
|
| + event_executor.Pass(),
|
| + video_capturer.Pass()),
|
| + daemon_sender_(daemon_sender),
|
| + terminal_opened_(false) {
|
| +}
|
| +
|
| +void IpcDesktopEnvironment::Start(
|
| + scoped_ptr<protocol::ClipboardStub> client_clipboard) {
|
| + DCHECK(!terminal_opened_);
|
| +
|
| + terminal_opened_ = true;
|
| + daemon_sender_->OpenTerminal(this);
|
| +
|
| + DesktopEnvironment::Start(client_clipboard.Pass());
|
| +}
|
| +
|
| +IpcDesktopEnvironment::~IpcDesktopEnvironment() {
|
| + if (terminal_opened_)
|
| + daemon_sender_->CloseTerminal(this);
|
| +}
|
| +
|
| +} // namespace remoting
|
|
|