diff options
author | garykac@google.com <garykac@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-31 16:22:46 +0000 |
---|---|---|
committer | garykac@google.com <garykac@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-31 16:22:46 +0000 |
commit | c1448a90c0e7db175552fd9480ce6f4b9ab5092c (patch) | |
tree | 75951ebae30b10cdc64b1c5bd496ee946d7c82b5 /remoting | |
parent | 9ed7f0794e8fdf03bb541ec0aa1185eeaa165358 (diff) | |
download | chromium_src-c1448a90c0e7db175552fd9480ce6f4b9ab5092c.zip chromium_src-c1448a90c0e7db175552fd9480ce6f4b9ab5092c.tar.gz chromium_src-c1448a90c0e7db175552fd9480ce6f4b9ab5092c.tar.bz2 |
Fix build breakage.
Add verbatim option to simple-host-process.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/3265007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58004 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting')
-rw-r--r-- | remoting/host/simple_host_process.cc | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/remoting/host/simple_host_process.cc b/remoting/host/simple_host_process.cc index 88c6234..b9692ae 100644 --- a/remoting/host/simple_host_process.cc +++ b/remoting/host/simple_host_process.cc @@ -26,6 +26,7 @@ #include "base/nss_util.h" #include "base/scoped_nsautorelease_pool.h" #include "base/thread.h" +#include "remoting/base/encoder_verbatim.h" #include "remoting/base/encoder_zlib.h" #include "remoting/host/capturer_fake.h" #include "remoting/host/chromoting_host.h" @@ -59,6 +60,7 @@ void ShutdownTask(MessageLoop* message_loop) { const std::string kFakeSwitchName = "fake"; const std::string kConfigSwitchName = "config"; +const std::string kVerbatimSwitchName = "verbatim"; int main(int argc, char** argv) { // Needed for the Mac, so we don't leak objects when threads are created. @@ -73,21 +75,22 @@ int main(int argc, char** argv) { scoped_ptr<remoting::Capturer> capturer; scoped_ptr<remoting::Encoder> encoder; - scoped_ptr<remoting::EventExecutor> executor; + scoped_ptr<remoting::EventExecutor> event_handler; #if defined(OS_WIN) capturer.reset(new remoting::CapturerGdi()); - executor.reset(new remoting::EventExecutorWin()); + event_handler.reset(new remoting::EventExecutorWin(capturer.get())); #elif defined(OS_LINUX) capturer.reset(new remoting::CapturerLinux()); - executor.reset(new remoting::EventExecutorLinux()); + event_handler.reset(new remoting::EventExecutorLinux(capturer.get())); #elif defined(OS_MACOSX) capturer.reset(new remoting::CapturerMac()); - executor.reset(new remoting::EventExecutorMac()); + event_handler.reset(new remoting::EventExecutorMac(capturer.get())); #endif encoder.reset(new remoting::EncoderZlib()); // Check the argument to see if we should use a fake capturer and encoder. bool fake = cmd_line->HasSwitch(kFakeSwitchName); + bool verbatim = cmd_line->HasSwitch(kVerbatimSwitchName); #if defined(OS_WIN) std::wstring path = GetEnvironmentVar(kHomeDrive); @@ -107,6 +110,11 @@ int main(int argc, char** argv) { capturer.reset(new remoting::CapturerFake()); } + if (verbatim) { + LOG(INFO) << "Using the verbatim encoder."; + encoder.reset(new remoting::EncoderVerbatim()); + } + base::Thread file_io_thread("FileIO"); file_io_thread.Start(); @@ -129,7 +137,7 @@ int main(int argc, char** argv) { config, capturer.release(), encoder.release(), - executor.release()); + event_handler.release()); // Let the chromoting host run until the shutdown task is executed. MessageLoop message_loop(MessageLoop::TYPE_UI); |