OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef REMOTING_CLIENT_IOS_APP_RUNTIME_H_ | |
6 #define REMOTING_CLIENT_IOS_APP_RUNTIME_H_ | |
7 | |
8 #include <memory> | |
9 #include <string> | |
10 | |
11 #include "base/bind.h" | |
12 #include "base/macros.h" | |
13 #include "base/memory/ref_counted.h" | |
14 #include "base/memory/weak_ptr.h" | |
15 #include "base/message_loop/message_loop.h" | |
16 #include "remoting/base/auto_thread.h" | |
17 #include "remoting/client/chromoting_client_runtime.h" | |
18 | |
19 //#include "remoting/client/ios/audio_player_ios.h" | |
20 | |
21 namespace remoting { | |
22 namespace ios { | |
23 | |
24 class AppRuntime { | |
25 public: | |
26 AppRuntime(); | |
27 | |
28 scoped_refptr<AutoThreadTaskRunner> display_task_runner() { | |
29 return runtime_->ui_task_runner(); | |
30 } | |
31 | |
32 scoped_refptr<AutoThreadTaskRunner> network_task_runner() { | |
33 return runtime_->network_task_runner(); | |
34 } | |
35 | |
36 scoped_refptr<AutoThreadTaskRunner> file_task_runner() { | |
37 return runtime_->file_task_runner(); | |
38 } | |
39 | |
40 // scoped_refptr<AutoThreadTaskRunner> audio_task_runner() { | |
41 // return _runtime->audio_task_runner(); | |
42 // } | |
joedow
2016/12/19 23:56:26
Delete commented out code?
| |
43 | |
44 private: | |
45 // This object is ref-counted, so it cleans itself up. | |
46 ~AppRuntime(); | |
47 | |
48 // void SetupOpenGl(); | |
49 | |
50 // Chromium code's connection to the OBJ_C message loop. Once created the | |
51 // MessageLoop will live for the life of the program. An attempt was made to | |
52 // create the primary message loop earlier in the programs life, but a | |
53 // MessageLoop requires ARC to be disabled. | |
54 std::unique_ptr<base::MessageLoopForUI> ui_loop_; | |
55 | |
56 std::unique_ptr<remoting::ChromotingClientRuntime> runtime_; | |
57 | |
58 DISALLOW_COPY_AND_ASSIGN(AppRuntime); | |
59 }; | |
60 | |
61 } // namespace ios | |
62 } // namespace remoting | |
63 | |
64 #endif // REMOTING_CLIENT_IOS_APP_RUNTIME_H_ | |
OLD | NEW |