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

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

Issue 10909143: Revert 155574 - [Chromoting] Refactoring DesktopEnvironment and moving screen/audio recorders to Cl… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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
8 #include "base/basictypes.h" 10 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
10 12
11 namespace remoting { 13 namespace remoting {
12 14
13 class AudioCapturer; 15 class AudioCapturer;
14 class ChromotingHostContext; 16 class ChromotingHostContext;
15 class EventExecutor; 17 class EventExecutor;
16 class VideoFrameCapturer; 18 class VideoFrameCapturer;
17 19
18 namespace protocol { 20 namespace protocol {
19 class ClipboardStub; 21 class ClipboardStub;
20 } 22 }
21 23
22 class DesktopEnvironment { 24 class DesktopEnvironment {
23 public: 25 public:
24 DesktopEnvironment(scoped_ptr<AudioCapturer> audio_capturer, 26 // Creates a DesktopEnvironment used in a host plugin.
25 scoped_ptr<EventExecutor> event_executor, 27 static scoped_ptr<DesktopEnvironment> Create(
26 scoped_ptr<VideoFrameCapturer> video_capturer); 28 ChromotingHostContext* context);
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
27 virtual ~DesktopEnvironment(); 40 virtual ~DesktopEnvironment();
28 41
42 VideoFrameCapturer* capturer() const { return capturer_.get(); }
43 EventExecutor* event_executor() const { return event_executor_.get(); }
29 AudioCapturer* audio_capturer() const { return audio_capturer_.get(); } 44 AudioCapturer* audio_capturer() const { return audio_capturer_.get(); }
30 EventExecutor* event_executor() const { return event_executor_.get(); } 45 void OnSessionStarted(scoped_ptr<protocol::ClipboardStub> client_clipboard);
31 VideoFrameCapturer* video_capturer() const { return video_capturer_.get(); } 46 void OnSessionFinished();
32
33 virtual void Start(
34 scoped_ptr<protocol::ClipboardStub> client_clipboard);
35 47
36 private: 48 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
37 // Used to capture audio to deliver to clients. 61 // Used to capture audio to deliver to clients.
38 scoped_ptr<AudioCapturer> audio_capturer_; 62 scoped_ptr<AudioCapturer> audio_capturer_;
39 63
40 // Executes input and clipboard events received from the client. 64 // Executes input and clipboard events received from the client.
41 scoped_ptr<EventExecutor> event_executor_; 65 scoped_ptr<EventExecutor> event_executor_;
42 66
43 // Used to capture video to deliver to clients.
44 scoped_ptr<VideoFrameCapturer> video_capturer_;
45
46 DISALLOW_COPY_AND_ASSIGN(DesktopEnvironment); 67 DISALLOW_COPY_AND_ASSIGN(DesktopEnvironment);
47 }; 68 };
48 69
49 } // namespace remoting 70 } // namespace remoting
50 71
51 #endif // REMOTING_HOST_DESKTOP_ENVIRONMENT_H_ 72 #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