Index: remoting/host/local_desktop_environment.h |
diff --git a/remoting/host/local_desktop_environment.h b/remoting/host/local_desktop_environment.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..f07570e65d0304049ebfec0bd3a4ba5418cf898c |
--- /dev/null |
+++ b/remoting/host/local_desktop_environment.h |
@@ -0,0 +1,59 @@ |
+// 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_LOCAL_DESKTOP_ENVIRONMENT_H_ |
+#define REMOTING_HOST_LOCAL_DESKTOP_ENVIRONMENT_H_ |
+ |
+#include "remoting/host/desktop_environment.h" |
+ |
+#include "base/basictypes.h" |
+#include "base/bind.h" |
+#include "base/callback.h" |
+ |
+namespace remoting { |
+ |
+// Used to create audio/video capturers and event executor that work with |
+// the local console. |
Wez
2013/01/11 02:23:41
nit: Really want to distinguish this from SessionE
alexeypa (please no reviews)
2013/01/11 19:59:46
This is coming in a follow up CL.
Wez
2013/01/12 01:58:06
Great. :)
alexeypa (please no reviews)
2013/01/14 20:43:09
Included into this CL because of other DE/DEF chan
|
+class LocalDesktopEnvironment : public DesktopEnvironment { |
Wez
2013/01/11 02:23:41
Not keen on this name, but I can't think of a bett
alexeypa (please no reviews)
2013/01/11 19:59:46
Me neither.
Wez
2013/01/12 01:58:06
BasicDesktopEnvironment, perhaps? "local" would e
alexeypa (please no reviews)
2013/01/14 20:43:09
BasicDesktopEnvironment
|
+ public: |
+ // Callback prototype that is invoked to create an instance of the event |
+ // executor. |
+ typedef base::Callback<scoped_ptr<EventExecutor>( |
+ scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, |
+ scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner)> |
+ CreateEventExecutorCallback; |
+ |
+ LocalDesktopEnvironment( |
+ scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, |
+ const CreateEventExecutorCallback& create_event_executor_callback); |
+ virtual ~LocalDesktopEnvironment(); |
+ |
+ // DesktopEnvironment implementation. |
+ virtual scoped_ptr<AudioCapturer> CreateAudioCapturer( |
+ scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner) OVERRIDE; |
+ virtual scoped_ptr<EventExecutor> CreateEventExecutor( |
+ scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, |
+ scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) OVERRIDE; |
+ virtual scoped_ptr<VideoFrameCapturer> CreateVideoCapturer( |
+ scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner, |
+ scoped_refptr<base::SingleThreadTaskRunner> encode_task_runner) OVERRIDE; |
+ |
+ private: |
+ // Task runner on which public methods of this class should be called. |
+ scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner_; |
+ |
+ // Invoked create an instance of the event executor. |
+ CreateEventExecutorCallback create_event_executor_callback_; |
+ |
+ // Flags used to make sure that the audio and video capturer are created |
+ // only once. |
+ bool audio_capturer_created_; |
+ bool video_capturer_created_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(LocalDesktopEnvironment); |
+}; |
+ |
+} // namespace remoting |
+ |
+#endif // REMOTING_HOST_LOCAL_DESKTOP_ENVIRONMENT_H_ |