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

Side by Side Diff: remoting/client/jni/chromoting_jni_runtime.h

Issue 1864213002: Convert //remoting to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mac IWYU Created 4 years, 8 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 unified diff | Download patch
OLDNEW
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
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
OLDNEW
« no previous file with comments | « remoting/client/jni/chromoting_jni_instance.cc ('k') | remoting/client/jni/jni_frame_consumer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698