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

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

Issue 10538091: [Chromoting] Make ChromotingHost's dependency on libjingle injected, instead of hard-coded. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix remoting.gyp. Created 8 years, 6 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
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 // 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 24 matching lines...) Expand all
35 #include "remoting/host/capturer_fake.h" 35 #include "remoting/host/capturer_fake.h"
36 #include "remoting/host/chromoting_host.h" 36 #include "remoting/host/chromoting_host.h"
37 #include "remoting/host/chromoting_host_context.h" 37 #include "remoting/host/chromoting_host_context.h"
38 #include "remoting/host/constants.h" 38 #include "remoting/host/constants.h"
39 #include "remoting/host/desktop_environment.h" 39 #include "remoting/host/desktop_environment.h"
40 #include "remoting/host/event_executor.h" 40 #include "remoting/host/event_executor.h"
41 #include "remoting/host/heartbeat_sender.h" 41 #include "remoting/host/heartbeat_sender.h"
42 #include "remoting/host/host_key_pair.h" 42 #include "remoting/host/host_key_pair.h"
43 #include "remoting/host/host_secret.h" 43 #include "remoting/host/host_secret.h"
44 #include "remoting/host/it2me_host_user_interface.h" 44 #include "remoting/host/it2me_host_user_interface.h"
45 #include "remoting/host/jingle_session_manager_factory.h"
45 #include "remoting/host/json_host_config.h" 46 #include "remoting/host/json_host_config.h"
46 #include "remoting/host/log_to_server.h" 47 #include "remoting/host/log_to_server.h"
48 #include "remoting/host/network_settings.h"
47 #include "remoting/host/register_support_host_request.h" 49 #include "remoting/host/register_support_host_request.h"
48 #include "remoting/host/signaling_connector.h" 50 #include "remoting/host/signaling_connector.h"
49 #include "remoting/jingle_glue/xmpp_signal_strategy.h" 51 #include "remoting/jingle_glue/xmpp_signal_strategy.h"
50 #include "remoting/proto/video.pb.h" 52 #include "remoting/proto/video.pb.h"
51 #include "remoting/protocol/it2me_host_authenticator_factory.h" 53 #include "remoting/protocol/it2me_host_authenticator_factory.h"
52 #include "remoting/protocol/me2me_host_authenticator_factory.h" 54 #include "remoting/protocol/me2me_host_authenticator_factory.h"
53 55
54 #if defined(TOOLKIT_GTK) 56 #if defined(TOOLKIT_GTK)
55 #include "ui/gfx/gtk_util.h" 57 #include "ui/gfx/gtk_util.h"
56 #elif defined(OS_MACOSX) 58 #elif defined(OS_MACOSX)
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 scoped_ptr<EventExecutor> event_executor = 227 scoped_ptr<EventExecutor> event_executor =
226 EventExecutor::Create(context_.desktop_message_loop(), 228 EventExecutor::Create(context_.desktop_message_loop(),
227 context_.ui_message_loop(), 229 context_.ui_message_loop(),
228 capturer.get()); 230 capturer.get());
229 desktop_environment_ = DesktopEnvironment::CreateFake( 231 desktop_environment_ = DesktopEnvironment::CreateFake(
230 &context_, capturer.Pass(), event_executor.Pass()); 232 &context_, capturer.Pass(), event_executor.Pass());
231 } else { 233 } else {
232 desktop_environment_ = DesktopEnvironment::Create(&context_); 234 desktop_environment_ = DesktopEnvironment::Create(&context_);
233 } 235 }
234 236
235 host_ = new ChromotingHost(&context_, signal_strategy_.get(), 237 host_ = new ChromotingHost(
236 desktop_environment_.get(), network_settings_); 238 &context_,
239 signal_strategy_.get(),
240 desktop_environment_.get(),
Sergey Ulanov 2012/06/13 01:57:19 here too.
simonmorris 2012/06/13 16:26:33 Done.
241 JingleSessionManagerFactory::CreateSessionManager(
242 network_settings_,
243 context_.url_request_context_getter()));
237 244
238 ServerLogEntry::Mode mode = 245 ServerLogEntry::Mode mode =
239 is_it2me_ ? ServerLogEntry::IT2ME : ServerLogEntry::ME2ME; 246 is_it2me_ ? ServerLogEntry::IT2ME : ServerLogEntry::ME2ME;
240 log_to_server_.reset(new LogToServer(host_, mode, signal_strategy_.get())); 247 log_to_server_.reset(new LogToServer(host_, mode, signal_strategy_.get()));
241 248
242 if (is_it2me_) { 249 if (is_it2me_) {
243 it2me_host_user_interface_.reset(new It2MeHostUserInterface(&context_)); 250 it2me_host_user_interface_.reset(new It2MeHostUserInterface(&context_));
244 it2me_host_user_interface_->Start( 251 it2me_host_user_interface_->Start(
245 host_, 252 host_,
246 base::Bind(&ChromotingHost::Shutdown, host_, base::Closure())); 253 base::Bind(&ChromotingHost::Shutdown, host_, base::Closure()));
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 max_port < 0 || max_port > 65535) { 414 max_port < 0 || max_port > 65535) {
408 LOG(ERROR) << "Invalid max-port value: " << max_port 415 LOG(ERROR) << "Invalid max-port value: " << max_port
409 << ". Expected integer in range [0, 65535]."; 416 << ". Expected integer in range [0, 65535].";
410 return 1; 417 return 1;
411 } 418 }
412 simple_host.network_settings()->max_port = max_port; 419 simple_host.network_settings()->max_port = max_port;
413 } 420 }
414 421
415 return simple_host.Run(); 422 return simple_host.Run();
416 } 423 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698