Index: remoting/client/ios/app_runtime.h |
diff --git a/remoting/client/ios/app_runtime.h b/remoting/client/ios/app_runtime.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..5326f740dacb26a9ed419433d9b65e5d2e403174 |
--- /dev/null |
+++ b/remoting/client/ios/app_runtime.h |
@@ -0,0 +1,64 @@ |
+// 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. |
+ |
+#ifndef REMOTING_CLIENT_IOS_APP_RUNTIME_H_ |
+#define REMOTING_CLIENT_IOS_APP_RUNTIME_H_ |
+ |
+#include <memory> |
+#include <string> |
+ |
+#include "base/bind.h" |
+#include "base/macros.h" |
+#include "base/memory/ref_counted.h" |
+#include "base/memory/weak_ptr.h" |
+#include "base/message_loop/message_loop.h" |
+#include "remoting/base/auto_thread.h" |
+#include "remoting/client/chromoting_client_runtime.h" |
+ |
+//#include "remoting/client/ios/audio_player_ios.h" |
+ |
+namespace remoting { |
+namespace ios { |
+ |
+class AppRuntime { |
+ public: |
+ AppRuntime(); |
+ |
+ scoped_refptr<AutoThreadTaskRunner> display_task_runner() { |
+ return runtime_->ui_task_runner(); |
+ } |
+ |
+ scoped_refptr<AutoThreadTaskRunner> network_task_runner() { |
+ return runtime_->network_task_runner(); |
+ } |
+ |
+ scoped_refptr<AutoThreadTaskRunner> file_task_runner() { |
+ return runtime_->file_task_runner(); |
+ } |
+ |
+ // scoped_refptr<AutoThreadTaskRunner> audio_task_runner() { |
+ // return _runtime->audio_task_runner(); |
+ // } |
joedow
2016/12/19 23:56:26
Delete commented out code?
|
+ |
+ private: |
+ // This object is ref-counted, so it cleans itself up. |
+ ~AppRuntime(); |
+ |
+ // void SetupOpenGl(); |
+ |
+ // Chromium code's connection to the OBJ_C message loop. Once created the |
+ // MessageLoop will live for the life of the program. An attempt was made to |
+ // create the primary message loop earlier in the programs life, but a |
+ // MessageLoop requires ARC to be disabled. |
+ std::unique_ptr<base::MessageLoopForUI> ui_loop_; |
+ |
+ std::unique_ptr<remoting::ChromotingClientRuntime> runtime_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(AppRuntime); |
+}; |
+ |
+} // namespace ios |
+} // namespace remoting |
+ |
+#endif // REMOTING_CLIENT_IOS_APP_RUNTIME_H_ |