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

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

Issue 11018004: Fix ChromotingHost and DesktopEnvironmentFactory references to TaskRunners. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Windows build. Created 8 years, 2 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/desktop_environment_factory.h ('k') | remoting/host/plugin/host_script_object.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 #include "remoting/host/desktop_environment_factory.h" 5 #include "remoting/host/desktop_environment_factory.h"
6 6
7 #include "remoting/host/audio_capturer.h" 7 #include "remoting/host/audio_capturer.h"
8 #include "remoting/host/chromoting_host_context.h" 8 #include "remoting/host/chromoting_host_context.h"
9 #include "remoting/host/desktop_environment.h" 9 #include "remoting/host/desktop_environment.h"
10 #include "remoting/host/event_executor.h" 10 #include "remoting/host/event_executor.h"
11 #include "remoting/host/video_frame_capturer.h" 11 #include "remoting/host/video_frame_capturer.h"
12 12
13 namespace remoting { 13 namespace remoting {
14 14
15 DesktopEnvironmentFactory::DesktopEnvironmentFactory() { 15 DesktopEnvironmentFactory::DesktopEnvironmentFactory(
16 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner,
17 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner)
18 : input_task_runner_(input_task_runner),
19 ui_task_runner_(ui_task_runner) {
16 } 20 }
17 21
18 DesktopEnvironmentFactory::~DesktopEnvironmentFactory() { 22 DesktopEnvironmentFactory::~DesktopEnvironmentFactory() {
19 } 23 }
20 24
21 scoped_ptr<DesktopEnvironment> DesktopEnvironmentFactory::Create( 25 scoped_ptr<DesktopEnvironment> DesktopEnvironmentFactory::Create() {
22 ChromotingHostContext* context) {
23 scoped_ptr<AudioCapturer> audio_capturer = AudioCapturer::Create(); 26 scoped_ptr<AudioCapturer> audio_capturer = AudioCapturer::Create();
24 scoped_ptr<EventExecutor> event_executor = EventExecutor::Create( 27 scoped_ptr<EventExecutor> event_executor = EventExecutor::Create(
25 context->desktop_task_runner(), 28 input_task_runner_, ui_task_runner_);
26 context->ui_task_runner());
27 scoped_ptr<VideoFrameCapturer> video_capturer(VideoFrameCapturer::Create()); 29 scoped_ptr<VideoFrameCapturer> video_capturer(VideoFrameCapturer::Create());
28 return scoped_ptr<DesktopEnvironment>(new DesktopEnvironment( 30 return scoped_ptr<DesktopEnvironment>(new DesktopEnvironment(
29 audio_capturer.Pass(), 31 audio_capturer.Pass(), event_executor.Pass(), video_capturer.Pass()));
30 event_executor.Pass(),
31 video_capturer.Pass()));
32 } 32 }
33 33
34 bool DesktopEnvironmentFactory::SupportsAudioCapture() const { 34 bool DesktopEnvironmentFactory::SupportsAudioCapture() const {
35 return AudioCapturer::IsSupported(); 35 return AudioCapturer::IsSupported();
36 } 36 }
37 37
38 } // namespace remoting 38 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/desktop_environment_factory.h ('k') | remoting/host/plugin/host_script_object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698