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

Side by Side Diff: remoting/host/desktop_environment.h

Issue 10915206: [Chromoting] Refactoring DesktopEnvironment and moving screen/audio recorders to ClientSession. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 8 years, 3 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
« no previous file with comments | « remoting/host/client_session_unittest.cc ('k') | remoting/host/desktop_environment.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef REMOTING_HOST_DESKTOP_ENVIRONMENT_H_ 5 #ifndef REMOTING_HOST_DESKTOP_ENVIRONMENT_H_
6 #define REMOTING_HOST_DESKTOP_ENVIRONMENT_H_ 6 #define REMOTING_HOST_DESKTOP_ENVIRONMENT_H_
7 7
8 #include <string>
9
10 #include "base/basictypes.h" 8 #include "base/basictypes.h"
11 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
12 10
13 namespace remoting { 11 namespace remoting {
14 12
15 class AudioCapturer; 13 class AudioCapturer;
16 class ChromotingHostContext; 14 class ChromotingHostContext;
17 class EventExecutor; 15 class EventExecutor;
18 class VideoFrameCapturer; 16 class VideoFrameCapturer;
19 17
20 namespace protocol { 18 namespace protocol {
21 class ClipboardStub; 19 class ClipboardStub;
22 } 20 }
23 21
24 class DesktopEnvironment { 22 class DesktopEnvironment {
25 public: 23 public:
26 // Creates a DesktopEnvironment used in a host plugin. 24 DesktopEnvironment(scoped_ptr<AudioCapturer> audio_capturer,
27 static scoped_ptr<DesktopEnvironment> Create( 25 scoped_ptr<EventExecutor> event_executor,
28 ChromotingHostContext* context); 26 scoped_ptr<VideoFrameCapturer> video_capturer);
29
30 // Creates a DesktopEnvironment used in a service process.
31 static scoped_ptr<DesktopEnvironment> CreateForService(
32 ChromotingHostContext* context);
33
34 static scoped_ptr<DesktopEnvironment> CreateFake(
35 ChromotingHostContext* context,
36 scoped_ptr<VideoFrameCapturer> capturer,
37 scoped_ptr<EventExecutor> event_executor,
38 scoped_ptr<AudioCapturer> audio_capturer);
39
40 virtual ~DesktopEnvironment(); 27 virtual ~DesktopEnvironment();
41 28
42 VideoFrameCapturer* capturer() const { return capturer_.get(); } 29 AudioCapturer* audio_capturer() const { return audio_capturer_.get(); }
43 EventExecutor* event_executor() const { return event_executor_.get(); } 30 EventExecutor* event_executor() const { return event_executor_.get(); }
44 AudioCapturer* audio_capturer() const { return audio_capturer_.get(); } 31 VideoFrameCapturer* video_capturer() const { return video_capturer_.get(); }
45 void OnSessionStarted(scoped_ptr<protocol::ClipboardStub> client_clipboard); 32
46 void OnSessionFinished(); 33 virtual void Start(
34 scoped_ptr<protocol::ClipboardStub> client_clipboard);
47 35
48 private: 36 private:
49 DesktopEnvironment(ChromotingHostContext* context,
50 scoped_ptr<VideoFrameCapturer> capturer,
51 scoped_ptr<EventExecutor> event_executor,
52 scoped_ptr<AudioCapturer> audio_capturer);
53
54 // Host context used to make sure operations are run on the correct thread.
55 // This is owned by the ChromotingHost.
56 ChromotingHostContext* context_;
57
58 // Used to capture video to deliver to clients.
59 scoped_ptr<VideoFrameCapturer> capturer_;
60
61 // Used to capture audio to deliver to clients. 37 // Used to capture audio to deliver to clients.
62 scoped_ptr<AudioCapturer> audio_capturer_; 38 scoped_ptr<AudioCapturer> audio_capturer_;
63 39
64 // Executes input and clipboard events received from the client. 40 // Executes input and clipboard events received from the client.
65 scoped_ptr<EventExecutor> event_executor_; 41 scoped_ptr<EventExecutor> event_executor_;
66 42
43 // Used to capture video to deliver to clients.
44 scoped_ptr<VideoFrameCapturer> video_capturer_;
45
67 DISALLOW_COPY_AND_ASSIGN(DesktopEnvironment); 46 DISALLOW_COPY_AND_ASSIGN(DesktopEnvironment);
68 }; 47 };
69 48
70 } // namespace remoting 49 } // namespace remoting
71 50
72 #endif // REMOTING_HOST_DESKTOP_ENVIRONMENT_H_ 51 #endif // REMOTING_HOST_DESKTOP_ENVIRONMENT_H_
OLDNEW
« no previous file with comments | « remoting/host/client_session_unittest.cc ('k') | remoting/host/desktop_environment.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698