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

Side by Side Diff: remoting/host/basic_desktop_environment.cc

Issue 12594009: Converted LocalInputMonitor into a SessionController instance. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 | « no previous file | remoting/host/chromoting_host.h » ('j') | remoting/host/local_input_monitor.h » ('J')
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 #include "remoting/host/basic_desktop_environment.h" 5 #include "remoting/host/basic_desktop_environment.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "media/video/capture/screen/screen_capturer.h" 8 #include "media/video/capture/screen/screen_capturer.h"
9 #include "remoting/host/audio_capturer.h" 9 #include "remoting/host/audio_capturer.h"
10 #include "remoting/host/event_executor.h" 10 #include "remoting/host/event_executor.h"
11 #include "remoting/host/local_input_monitor.h"
11 #include "remoting/host/session_controller.h" 12 #include "remoting/host/session_controller.h"
12 13
13 namespace remoting { 14 namespace remoting {
14 15
15 BasicDesktopEnvironment::~BasicDesktopEnvironment() { 16 BasicDesktopEnvironment::~BasicDesktopEnvironment() {
16 DCHECK(caller_task_runner_->BelongsToCurrentThread()); 17 DCHECK(caller_task_runner_->BelongsToCurrentThread());
17 } 18 }
18 19
19 scoped_ptr<AudioCapturer> BasicDesktopEnvironment::CreateAudioCapturer() { 20 scoped_ptr<AudioCapturer> BasicDesktopEnvironment::CreateAudioCapturer() {
20 DCHECK(caller_task_runner_->BelongsToCurrentThread()); 21 DCHECK(caller_task_runner_->BelongsToCurrentThread());
21 22
22 return AudioCapturer::Create(); 23 return AudioCapturer::Create();
23 } 24 }
24 25
25 scoped_ptr<EventExecutor> BasicDesktopEnvironment::CreateEventExecutor() { 26 scoped_ptr<EventExecutor> BasicDesktopEnvironment::CreateEventExecutor() {
26 DCHECK(caller_task_runner_->BelongsToCurrentThread()); 27 DCHECK(caller_task_runner_->BelongsToCurrentThread());
27 28
28 return EventExecutor::Create(input_task_runner(), ui_task_runner()); 29 return EventExecutor::Create(input_task_runner(), ui_task_runner());
29 } 30 }
30 31
31 scoped_ptr<SessionController> 32 scoped_ptr<SessionController>
32 BasicDesktopEnvironment::CreateSessionController( 33 BasicDesktopEnvironment::CreateSessionController(
33 const std::string& client_jid, 34 const std::string& client_jid,
34 SessionController::Delegate* delegate) { 35 SessionController::Delegate* delegate) {
35 DCHECK(caller_task_runner_->BelongsToCurrentThread()); 36 DCHECK(caller_task_runner_->BelongsToCurrentThread());
36 37
37 return scoped_ptr<SessionController>(); 38 // Create the local input monitor.
39 scoped_ptr<LocalInputMonitor> local_input_monitor =
40 LocalInputMonitor::Create(caller_task_runner_,
41 input_task_runner_,
42 ui_task_runner_,
43 delegate);
44 return local_input_monitor.PassAs<SessionController>();
38 } 45 }
39 46
40 scoped_ptr<media::ScreenCapturer> 47 scoped_ptr<media::ScreenCapturer>
41 BasicDesktopEnvironment::CreateVideoCapturer() { 48 BasicDesktopEnvironment::CreateVideoCapturer() {
42 DCHECK(caller_task_runner_->BelongsToCurrentThread()); 49 DCHECK(caller_task_runner_->BelongsToCurrentThread());
43 50
44 // The basic desktop environment does not use X DAMAGE, since it is 51 // The basic desktop environment does not use X DAMAGE, since it is
45 // broken on many systems - see http://crbug.com/73423. 52 // broken on many systems - see http://crbug.com/73423.
46 return media::ScreenCapturer::Create(); 53 return media::ScreenCapturer::Create();
47 } 54 }
(...skipping 29 matching lines...) Expand all
77 ui_task_runner())); 84 ui_task_runner()));
78 } 85 }
79 86
80 bool BasicDesktopEnvironmentFactory::SupportsAudioCapture() const { 87 bool BasicDesktopEnvironmentFactory::SupportsAudioCapture() const {
81 DCHECK(caller_task_runner_->BelongsToCurrentThread()); 88 DCHECK(caller_task_runner_->BelongsToCurrentThread());
82 89
83 return AudioCapturer::IsSupported(); 90 return AudioCapturer::IsSupported();
84 } 91 }
85 92
86 } // namespace remoting 93 } // namespace remoting
OLDNEW
« no previous file with comments | « no previous file | remoting/host/chromoting_host.h » ('j') | remoting/host/local_input_monitor.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698