diff options
author | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-15 00:20:38 +0000 |
---|---|---|
committer | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-15 00:20:38 +0000 |
commit | 2a4f9884f3b47a5af5bac0703251efa77810986e (patch) | |
tree | 78a2cfaa1fb2f33d4b82ac166eef6f1206794e20 /remoting/host/simple_host_process.cc | |
parent | aa81a750d6898c19e2d820745670b04a6ba5f61a (diff) | |
download | chromium_src-2a4f9884f3b47a5af5bac0703251efa77810986e.zip chromium_src-2a4f9884f3b47a5af5bac0703251efa77810986e.tar.gz chromium_src-2a4f9884f3b47a5af5bac0703251efa77810986e.tar.bz2 |
Cleanup some chromoting code
Renamed SimpleHost to ChromotingHost as it's not simple any more and it's
becoming mature enough to be the main host implementation.
Review URL: http://codereview.chromium.org/2722010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49748 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host/simple_host_process.cc')
-rw-r--r-- | remoting/host/simple_host_process.cc | 45 |
1 files changed, 8 insertions, 37 deletions
diff --git a/remoting/host/simple_host_process.cc b/remoting/host/simple_host_process.cc index 79db106..d32547f 100644 --- a/remoting/host/simple_host_process.cc +++ b/remoting/host/simple_host_process.cc @@ -25,7 +25,7 @@ #include "base/waitable_event.h" #include "remoting/host/capturer_fake.h" #include "remoting/host/encoder_verbatim.h" -#include "remoting/host/simple_host.h" +#include "remoting/host/chromoting_host.h" #if defined(OS_WIN) #include "remoting/host/capturer_gdi.h" @@ -38,35 +38,6 @@ #include "remoting/host/event_executor_mac.h" #endif -void SetConsoleEcho(bool on) { -#if defined(OS_WIN) - HANDLE hIn = GetStdHandle(STD_INPUT_HANDLE); - if ((hIn == INVALID_HANDLE_VALUE) || (hIn == NULL)) - return; - - DWORD mode; - if (!GetConsoleMode(hIn, &mode)) - return; - - if (on) { - mode = mode | ENABLE_ECHO_INPUT; - } else { - mode = mode & ~ENABLE_ECHO_INPUT; - } - - SetConsoleMode(hIn, mode); -#elif defined(OS_POSIX) - struct termios settings; - tcgetattr(STDIN_FILENO, &settings); - if (on) { - settings.c_lflag |= ECHO; - } else { - settings.c_lflag &= ~ECHO; - } - tcsetattr(STDIN_FILENO, TCSANOW, &settings); -#endif // defined(OS_WIN) -} - int main(int argc, char** argv) { base::AtExitManager exit_manager; @@ -131,15 +102,15 @@ int main(int argc, char** argv) { capturer.reset(new remoting::CapturerFake()); } - // Construct a simple host with username and auth_token. + // Construct a chromoting host with username and auth_token. // TODO(hclam): Allow the host to load saved credentials. base::WaitableEvent host_done(false, false); - scoped_refptr<remoting::SimpleHost> host - = new remoting::SimpleHost(username, auth_token, - capturer.release(), - encoder.release(), - executor.release(), - &host_done); + scoped_refptr<remoting::ChromotingHost> host + = new remoting::ChromotingHost(username, auth_token, + capturer.release(), + encoder.release(), + executor.release(), + &host_done); host->Run(); host_done.Wait(); return 0; |