Chromium Code Reviews| Index: remoting/client/ios/app_runtime.cc |
| diff --git a/remoting/client/ios/app_runtime.cc b/remoting/client/ios/app_runtime.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..bc97fb33c6cf79b59cfa4a7ceabf7215af6bb548 |
| --- /dev/null |
| +++ b/remoting/client/ios/app_runtime.cc |
| @@ -0,0 +1,48 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "remoting/client/ios/app_runtime.h" |
| + |
| +#include "base/bind.h" |
| +#include "base/bind_helpers.h" |
| +#include "base/logging.h" |
| +#include "base/memory/ptr_util.h" |
| +#include "base/synchronization/waitable_event.h" |
| +#include "jingle/glue/thread_wrapper.h" |
| +#include "net/socket/client_socket_factory.h" |
| +#include "remoting/base/chromium_url_request.h" |
| +#include "remoting/base/url_request_context_getter.h" |
| +#include "remoting/client/audio_player.h" |
| +#include "remoting/client/client_status_logger.h" |
| +#include "remoting/client/ios/bridge/client_proxy.h" |
| +#include "remoting/proto/event.pb.h" |
| +#include "remoting/protocol/chromium_port_allocator_factory.h" |
| +#include "remoting/protocol/client_authentication_config.h" |
| +#include "remoting/protocol/host_stub.h" |
| +#include "remoting/protocol/negotiating_client_authenticator.h" |
| +#include "remoting/protocol/transport_context.h" |
| +#include "remoting/signaling/delegating_signal_strategy.h" |
| + |
| +namespace remoting { |
| +namespace ios { |
| + |
| +AppRuntime::AppRuntime() { |
| + if (!base::MessageLoop::current()) { |
| + VLOG(1) << "Starting main message loop"; |
| + ui_loop_.reset(new base::MessageLoopForUI()); |
| + base::MessageLoopForUI::current()->Attach(); |
| + } else { |
| + VLOG(1) << "Using existing main message loop"; |
| + ui_loop_.reset(base::MessageLoopForUI::current()); |
| + } |
| + |
| + runtime_ = ChromotingClientRuntime::Create(ui_loop_.get()); |
| +} |
| + |
| +AppRuntime::~AppRuntime() { |
| + // need to stop things? |
|
joedow
2016/12/19 23:56:26
Was this meant as a TODO?
|
| +} |
| + |
| +} // namespace ios |
| +} // namespace remoting |