Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef REMOTING_HOST_LOCAL_DESKTOP_ENVIRONMENT_H_ | |
| 6 #define REMOTING_HOST_LOCAL_DESKTOP_ENVIRONMENT_H_ | |
| 7 | |
| 8 #include "remoting/host/desktop_environment.h" | |
| 9 | |
| 10 #include "base/basictypes.h" | |
| 11 #include "base/bind.h" | |
| 12 #include "base/callback.h" | |
| 13 | |
| 14 namespace remoting { | |
| 15 | |
| 16 // Used to create audio/video capturers and event executor that work with | |
| 17 // 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
| |
| 18 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
| |
| 19 public: | |
| 20 // Callback prototype that is invoked to create an instance of the event | |
| 21 // executor. | |
| 22 typedef base::Callback<scoped_ptr<EventExecutor>( | |
| 23 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, | |
| 24 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner)> | |
| 25 CreateEventExecutorCallback; | |
| 26 | |
| 27 LocalDesktopEnvironment( | |
| 28 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, | |
| 29 const CreateEventExecutorCallback& create_event_executor_callback); | |
| 30 virtual ~LocalDesktopEnvironment(); | |
| 31 | |
| 32 // DesktopEnvironment implementation. | |
| 33 virtual scoped_ptr<AudioCapturer> CreateAudioCapturer( | |
| 34 scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner) OVERRIDE; | |
| 35 virtual scoped_ptr<EventExecutor> CreateEventExecutor( | |
| 36 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, | |
| 37 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) OVERRIDE; | |
| 38 virtual scoped_ptr<VideoFrameCapturer> CreateVideoCapturer( | |
| 39 scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner, | |
| 40 scoped_refptr<base::SingleThreadTaskRunner> encode_task_runner) OVERRIDE; | |
| 41 | |
| 42 private: | |
| 43 // Task runner on which public methods of this class should be called. | |
| 44 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner_; | |
| 45 | |
| 46 // Invoked create an instance of the event executor. | |
| 47 CreateEventExecutorCallback create_event_executor_callback_; | |
| 48 | |
| 49 // Flags used to make sure that the audio and video capturer are created | |
| 50 // only once. | |
| 51 bool audio_capturer_created_; | |
| 52 bool video_capturer_created_; | |
| 53 | |
| 54 DISALLOW_COPY_AND_ASSIGN(LocalDesktopEnvironment); | |
| 55 }; | |
| 56 | |
| 57 } // namespace remoting | |
| 58 | |
| 59 #endif // REMOTING_HOST_LOCAL_DESKTOP_ENVIRONMENT_H_ | |
| OLD | NEW |