OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef REMOTING_CLIENT_JNI_CHROMOTING_JNI_RUNTIME_H_ | 5 #ifndef REMOTING_CLIENT_JNI_CHROMOTING_JNI_RUNTIME_H_ |
6 #define REMOTING_CLIENT_JNI_CHROMOTING_JNI_RUNTIME_H_ | 6 #define REMOTING_CLIENT_JNI_CHROMOTING_JNI_RUNTIME_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 // all sessions depended. Because destruction only occurs at application exit | 122 // all sessions depended. Because destruction only occurs at application exit |
123 // after all connections have terminated, it is safe to make unretained | 123 // after all connections have terminated, it is safe to make unretained |
124 // cross-thread calls on the class. | 124 // cross-thread calls on the class. |
125 virtual ~ChromotingJniRuntime(); | 125 virtual ~ChromotingJniRuntime(); |
126 | 126 |
127 // Detaches JVM from the current thread, then signals. Doesn't own |waiter|. | 127 // Detaches JVM from the current thread, then signals. Doesn't own |waiter|. |
128 void DetachFromVmAndSignal(base::WaitableEvent* waiter); | 128 void DetachFromVmAndSignal(base::WaitableEvent* waiter); |
129 | 129 |
130 // Chromium code's connection to the app message loop. Once created the | 130 // Chromium code's connection to the app message loop. Once created the |
131 // MessageLoop will live for the life of the program. | 131 // MessageLoop will live for the life of the program. |
132 scoped_ptr<base::MessageLoopForUI> ui_loop_; | 132 std::unique_ptr<base::MessageLoopForUI> ui_loop_; |
133 | 133 |
134 // Contains threads. | 134 // Contains threads. |
135 // | 135 // |
136 scoped_ptr<ChromotingClientRuntime> runtime_; | 136 std::unique_ptr<ChromotingClientRuntime> runtime_; |
137 | 137 |
138 // Contains all connection-specific state. | 138 // Contains all connection-specific state. |
139 scoped_refptr<ChromotingJniInstance> session_; | 139 scoped_refptr<ChromotingJniInstance> session_; |
140 | 140 |
141 friend struct base::DefaultSingletonTraits<ChromotingJniRuntime>; | 141 friend struct base::DefaultSingletonTraits<ChromotingJniRuntime>; |
142 | 142 |
143 DISALLOW_COPY_AND_ASSIGN(ChromotingJniRuntime); | 143 DISALLOW_COPY_AND_ASSIGN(ChromotingJniRuntime); |
144 }; | 144 }; |
145 | 145 |
146 } // namespace remoting | 146 } // namespace remoting |
147 | 147 |
148 #endif | 148 #endif |
OLD | NEW |