diff options
author | dmaclach@chromium.org <dmaclach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-02 21:53:12 +0000 |
---|---|---|
committer | dmaclach@chromium.org <dmaclach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-02 21:53:12 +0000 |
commit | 26b627e55c5e9c1bd4d00bb6613fea7a6cb2c463 (patch) | |
tree | 4e7ae2b960c69828ec30df00c579b69cc75df7e0 /remoting/host/simple_host_process.cc | |
parent | 6f4280104722d792dfea82b40ed4d299c39e7786 (diff) | |
download | chromium_src-26b627e55c5e9c1bd4d00bb6613fea7a6cb2c463.zip chromium_src-26b627e55c5e9c1bd4d00bb6613fea7a6cb2c463.tar.gz chromium_src-26b627e55c5e9c1bd4d00bb6613fea7a6cb2c463.tar.bz2 |
Fix up mac test client and simple host for remoting.
Remoting's test client and simple host weren't initializing the NSApplication correctly which is required for MessageLoops to work on the Mac. These are just test apps that we use, so I felt it was ok to bring in code from base/test.
Also added a check to message_pump_mac.mm to verify that NSApp is initialized before we attempt to use it.
BUG=NONE
TEST=BUILD
Review URL: http://codereview.chromium.org/6461023
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76624 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host/simple_host_process.cc')
-rw-r--r-- | remoting/host/simple_host_process.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/remoting/host/simple_host_process.cc b/remoting/host/simple_host_process.cc index d979e83..aa8c1bc 100644 --- a/remoting/host/simple_host_process.cc +++ b/remoting/host/simple_host_process.cc @@ -26,6 +26,7 @@ #include "base/mac/scoped_nsautorelease_pool.h" #include "base/nss_util.h" #include "base/path_service.h" +#include "base/test/mock_chrome_application_mac.h" #include "base/threading/thread.h" #include "media/base/media.h" #include "remoting/base/tracer.h" @@ -164,6 +165,10 @@ int main(int argc, char** argv) { host->set_protocol_config(config.release()); } +#if defined(OS_MACOSX) + mock_cr_app::RegisterMockCrApp(); +#endif // OS_MACOSX + // Let the chromoting host run until the shutdown task is executed. host->Start(NewRunnableFunction(&ShutdownTask, &message_loop)); message_loop.MessageLoop::Run(); |