summaryrefslogtreecommitdiffstats
path: root/remoting/host/desktop_environment.h
blob: a653c78e062c6b0b71a322d97d546ca71a418801 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// 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.

#ifndef REMOTING_HOST_DESKTOP_ENVIRONMENT_H_
#define REMOTING_HOST_DESKTOP_ENVIRONMENT_H_

#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"

namespace remoting {

class AudioCapturer;
class ChromotingHostContext;
class EventExecutor;
class VideoFrameCapturer;

namespace protocol {
class ClipboardStub;
}

class DesktopEnvironment {
 public:
  DesktopEnvironment(scoped_ptr<AudioCapturer> audio_capturer,
                     scoped_ptr<EventExecutor> event_executor,
                     scoped_ptr<VideoFrameCapturer> video_capturer);
  virtual ~DesktopEnvironment();

  AudioCapturer* audio_capturer() const { return audio_capturer_.get(); }
  EventExecutor* event_executor() const { return event_executor_.get(); }
  VideoFrameCapturer* video_capturer() const { return video_capturer_.get(); }

  virtual void Start(
      scoped_ptr<protocol::ClipboardStub> client_clipboard);

 private:
  // Used to capture audio to deliver to clients.
  scoped_ptr<AudioCapturer> audio_capturer_;

  // Executes input and clipboard events received from the client.
  scoped_ptr<EventExecutor> event_executor_;

  // Used to capture video to deliver to clients.
  scoped_ptr<VideoFrameCapturer> video_capturer_;

  DISALLOW_COPY_AND_ASSIGN(DesktopEnvironment);
};

}  // namespace remoting

#endif  // REMOTING_HOST_DESKTOP_ENVIRONMENT_H_