Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(538)

Unified Diff: remoting/client/ios/app_runtime.h

Issue 2628403002: Migrating host preferences, runtime, and gestures to chromium from internal. (Closed)
Patch Set: Rename impl to match new header file name. Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/client/ios/BUILD.gn ('k') | remoting/client/ios/app_runtime.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..5441e4764276fec8e09ba6209ab144a1de3ef2c5
--- /dev/null
+++ b/remoting/client/ios/app_runtime.h
@@ -0,0 +1,67 @@
+// Copyright 2017 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"
+
+// TODO(nicholss): Saving this for a pending CL that introduces audio.
+//#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();
+ }
+
+ // TODO(nicholss): Saving this for a pending CL that introduces audio.
+ // scoped_refptr<AutoThreadTaskRunner> audio_task_runner() {
+ // return _runtime->audio_task_runner();
+ // }
+
+ private:
+ // This object is ref-counted, so it cleans itself up.
+ ~AppRuntime();
+
+ // TODO(nicholss): Saving this for a pending CL that introduces GL rendering.
+ // 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_
« no previous file with comments | « remoting/client/ios/BUILD.gn ('k') | remoting/client/ios/app_runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698