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

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

Issue 11761019: Tiny little refactoring of DesktopEnvironment. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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_fake.h ('k') | remoting/host/desktop_session_proxy.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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 #include "remoting/host/desktop_environment_fake.h"
6
7 #include "base/single_thread_task_runner.h"
8 #include "remoting/capturer/video_frame_capturer_fake.h"
9 #include "remoting/codec/audio_encoder.h"
10 #include "remoting/codec/video_encoder.h"
11 #include "remoting/host/video_scheduler.h"
12
13 namespace remoting {
14
15 DesktopEnvironmentFake::DesktopEnvironmentFake(
16 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner)
17 : caller_task_runner_(caller_task_runner) {
18 }
19
20 DesktopEnvironmentFake::~DesktopEnvironmentFake() {
21 // Stop the video scheduler and clear references to the client's stubs.
22 if (video_scheduler_.get()) {
23 video_scheduler_->Stop();
24 video_scheduler_ = NULL;
25 }
26 }
27
28 void DesktopEnvironmentFake::InjectClipboardEvent(
29 const protocol::ClipboardEvent& event) {
30 }
31
32 void DesktopEnvironmentFake::InjectKeyEvent(const protocol::KeyEvent& event) {
33 }
34
35 void DesktopEnvironmentFake::InjectMouseEvent(
36 const protocol::MouseEvent& event) {
37 }
38
39 void DesktopEnvironmentFake::StartAudio(
40 scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner,
41 scoped_ptr<AudioEncoder> audio_encoder,
42 protocol::AudioStub* audio_stub) {
43 }
44
45 void DesktopEnvironmentFake::PauseAudio(bool pause) {
46 }
47
48 void DesktopEnvironmentFake::StartInput(
49 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner,
50 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner,
51 protocol::ClipboardStub* clipboard_stub) {
52 }
53
54 void DesktopEnvironmentFake::StartVideo(
55 scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner,
56 scoped_refptr<base::SingleThreadTaskRunner> encode_task_runner,
57 scoped_ptr<VideoEncoder> video_encoder,
58 protocol::CursorShapeStub* cursor_shape_stub,
59 protocol::VideoStub* video_stub) {
60 DCHECK(!video_scheduler_.get());
61
62 // Create a fake video capturer that generates artificial image for testing
63 // purpose.
64 scoped_ptr<VideoFrameCapturer> video_capturer(new VideoFrameCapturerFake());
65
66 // Create and start video scheduler. The |cursor_shape_stub| and |video_stub|
67 // references are cleared by ~LocalDesktopEnvironment().
68 video_scheduler_ = VideoScheduler::Create(capture_task_runner,
69 encode_task_runner,
70 caller_task_runner_,
71 video_capturer.Pass(),
72 video_encoder.Pass(),
73 cursor_shape_stub,
74 video_stub);
75 }
76
77 SkISize DesktopEnvironmentFake::GetScreenSize() const {
78 return SkISize::Make(0, 0);
79 }
80
81 void DesktopEnvironmentFake::PauseVideo(bool pause) {
82 }
83
84 void DesktopEnvironmentFake::UpdateSequenceNumber(int64 sequence_number) {
85 }
86
87 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/desktop_environment_fake.h ('k') | remoting/host/desktop_session_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698