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

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

Issue 6780014: Clean up remoting project (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: got rid of ref counting on user authenticator Created 9 years, 8 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/screen_recorder_unittest.cc ('k') | remoting/host/user_authenticator.h » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // This is an application of a minimal host process in a Chromoting 5 // This is an application of a minimal host process in a Chromoting
6 // system. It serves the purpose of gluing different pieces together 6 // system. It serves the purpose of gluing different pieces together
7 // to make a functional host process for testing. 7 // to make a functional host process for testing.
8 // 8 //
9 // It peforms the following functionality: 9 // It peforms the following functionality:
10 // 1. Connect to the GTalk network and register the machine as a host. 10 // 1. Connect to the GTalk network and register the machine as a host.
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 CHECK(media::InitializeMediaLibrary(module_path)) 124 CHECK(media::InitializeMediaLibrary(module_path))
125 << "Cannot load media library"; 125 << "Cannot load media library";
126 126
127 // Construct a chromoting host. 127 // Construct a chromoting host.
128 scoped_refptr<ChromotingHost> host; 128 scoped_refptr<ChromotingHost> host;
129 129
130 bool fake = cmd_line->HasSwitch(kFakeSwitchName); 130 bool fake = cmd_line->HasSwitch(kFakeSwitchName);
131 if (fake) { 131 if (fake) {
132 remoting::Capturer* capturer = 132 remoting::Capturer* capturer =
133 new remoting::CapturerFake(); 133 new remoting::CapturerFake();
134 remoting::protocol::InputStub* input_stub = 134 remoting::EventExecutor* event_executor =
135 CreateEventExecutor(context.ui_message_loop(), capturer); 135 remoting::EventExecutor::Create(context.ui_message_loop(), capturer);
136 remoting::Curtain* curtain = remoting::Curtain::Create(); 136 remoting::Curtain* curtain = remoting::Curtain::Create();
137 host = ChromotingHost::Create( 137 host = ChromotingHost::Create(
138 &context, config, 138 &context, config,
139 new DesktopEnvironment(capturer, input_stub, curtain)); 139 new DesktopEnvironment(capturer, event_executor, curtain));
140 } else { 140 } else {
141 host = ChromotingHost::Create(&context, config); 141 host = ChromotingHost::Create(&context, config);
142 } 142 }
143 143
144 if (cmd_line->HasSwitch(kVideoSwitchName)) { 144 if (cmd_line->HasSwitch(kVideoSwitchName)) {
145 string video_codec = cmd_line->GetSwitchValueASCII(kVideoSwitchName); 145 string video_codec = cmd_line->GetSwitchValueASCII(kVideoSwitchName);
146 scoped_ptr<CandidateSessionConfig> config( 146 scoped_ptr<CandidateSessionConfig> config(
147 CandidateSessionConfig::CreateDefault()); 147 CandidateSessionConfig::CreateDefault());
148 config->mutable_video_configs()->clear(); 148 config->mutable_video_configs()->clear();
149 149
(...skipping 24 matching lines...) Expand all
174 174
175 // Let the chromoting host run until the shutdown task is executed. 175 // Let the chromoting host run until the shutdown task is executed.
176 host->Start(NewRunnableFunction(&ShutdownTask, &message_loop)); 176 host->Start(NewRunnableFunction(&ShutdownTask, &message_loop));
177 message_loop.MessageLoop::Run(); 177 message_loop.MessageLoop::Run();
178 178
179 // And then stop the chromoting context. 179 // And then stop the chromoting context.
180 context.Stop(); 180 context.Stop();
181 file_io_thread.Stop(); 181 file_io_thread.Stop();
182 return 0; 182 return 0;
183 } 183 }
OLDNEW
« no previous file with comments | « remoting/host/screen_recorder_unittest.cc ('k') | remoting/host/user_authenticator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698