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

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

Issue 11028128: [Chromoting] Request the daemon to open a terminal once a connection has been accepted. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased 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
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 18 matching lines...) Expand all
29 #include "base/utf_string_conversions.h" 29 #include "base/utf_string_conversions.h"
30 #include "base/threading/thread.h" 30 #include "base/threading/thread.h"
31 #include "crypto/nss_util.h" 31 #include "crypto/nss_util.h"
32 #include "net/base/network_change_notifier.h" 32 #include "net/base/network_change_notifier.h"
33 #include "net/socket/ssl_server_socket.h" 33 #include "net/socket/ssl_server_socket.h"
34 #include "remoting/base/auto_thread_task_runner.h" 34 #include "remoting/base/auto_thread_task_runner.h"
35 #include "remoting/base/constants.h" 35 #include "remoting/base/constants.h"
36 #include "remoting/host/audio_capturer.h" 36 #include "remoting/host/audio_capturer.h"
37 #include "remoting/host/chromoting_host_context.h" 37 #include "remoting/host/chromoting_host_context.h"
38 #include "remoting/host/chromoting_host.h" 38 #include "remoting/host/chromoting_host.h"
39 #include "remoting/host/client_session.h"
39 #include "remoting/host/desktop_environment.h" 40 #include "remoting/host/desktop_environment.h"
40 #include "remoting/host/desktop_environment.h" 41 #include "remoting/host/desktop_environment.h"
41 #include "remoting/host/desktop_environment_factory.h" 42 #include "remoting/host/desktop_environment_factory.h"
42 #include "remoting/host/dns_blackhole_checker.h" 43 #include "remoting/host/dns_blackhole_checker.h"
43 #include "remoting/host/event_executor.h" 44 #include "remoting/host/event_executor.h"
44 #include "remoting/host/event_executor_fake.h" 45 #include "remoting/host/event_executor_fake.h"
45 #include "remoting/host/heartbeat_sender.h" 46 #include "remoting/host/heartbeat_sender.h"
46 #include "remoting/host/host_exit_codes.h" 47 #include "remoting/host/host_exit_codes.h"
47 #include "remoting/host/host_key_pair.h" 48 #include "remoting/host/host_key_pair.h"
48 #include "remoting/host/host_secret.h" 49 #include "remoting/host/host_secret.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 96
96 } // namespace 97 } // namespace
97 98
98 namespace remoting { 99 namespace remoting {
99 100
100 class FakeDesktopEnvironmentFactory : public DesktopEnvironmentFactory { 101 class FakeDesktopEnvironmentFactory : public DesktopEnvironmentFactory {
101 public: 102 public:
102 FakeDesktopEnvironmentFactory(); 103 FakeDesktopEnvironmentFactory();
103 virtual ~FakeDesktopEnvironmentFactory(); 104 virtual ~FakeDesktopEnvironmentFactory();
104 105
105 virtual scoped_ptr<DesktopEnvironment> Create() OVERRIDE; 106 virtual scoped_ptr<DesktopEnvironment> Create(ClientSession* client) OVERRIDE;
106 107
107 private: 108 private:
108 DISALLOW_COPY_AND_ASSIGN(FakeDesktopEnvironmentFactory); 109 DISALLOW_COPY_AND_ASSIGN(FakeDesktopEnvironmentFactory);
109 }; 110 };
110 111
111 FakeDesktopEnvironmentFactory::FakeDesktopEnvironmentFactory() 112 FakeDesktopEnvironmentFactory::FakeDesktopEnvironmentFactory()
112 : DesktopEnvironmentFactory(NULL, NULL) { 113 : DesktopEnvironmentFactory(NULL, NULL) {
113 } 114 }
114 115
115 FakeDesktopEnvironmentFactory::~FakeDesktopEnvironmentFactory() { 116 FakeDesktopEnvironmentFactory::~FakeDesktopEnvironmentFactory() {
116 } 117 }
117 118
118 scoped_ptr<DesktopEnvironment> FakeDesktopEnvironmentFactory::Create() { 119 scoped_ptr<DesktopEnvironment> FakeDesktopEnvironmentFactory::Create(
120 ClientSession* client) {
119 scoped_ptr<VideoFrameCapturer> capturer(new VideoFrameCapturerFake()); 121 scoped_ptr<VideoFrameCapturer> capturer(new VideoFrameCapturerFake());
120 scoped_ptr<EventExecutor> event_executor(new EventExecutorFake()); 122 scoped_ptr<EventExecutor> event_executor(new EventExecutorFake());
121 return scoped_ptr<DesktopEnvironment>(new DesktopEnvironment( 123 return scoped_ptr<DesktopEnvironment>(new DesktopEnvironment(
122 scoped_ptr<AudioCapturer>(NULL), 124 scoped_ptr<AudioCapturer>(NULL),
123 event_executor.Pass(), 125 event_executor.Pass(),
124 capturer.Pass())); 126 capturer.Pass()));
125 } 127 }
126 128
127 class SimpleHost : public HeartbeatSender::Listener { 129 class SimpleHost : public HeartbeatSender::Listener {
128 public: 130 public:
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 max_port < 0 || max_port > 65535) { 459 max_port < 0 || max_port > 65535) {
458 LOG(ERROR) << "Invalid max-port value: " << max_port 460 LOG(ERROR) << "Invalid max-port value: " << max_port
459 << ". Expected integer in range [0, 65535]."; 461 << ". Expected integer in range [0, 65535].";
460 return 1; 462 return 1;
461 } 463 }
462 simple_host.network_settings()->max_port = max_port; 464 simple_host.network_settings()->max_port = max_port;
463 } 465 }
464 466
465 return simple_host.Run(); 467 return simple_host.Run();
466 } 468 }
OLDNEW
« no previous file with comments | « remoting/host/remoting_me2me_host.cc ('k') | remoting/host/win/session_desktop_environment_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698