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

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

Issue 29583003: Use jni_generator in Chromoting Android client (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 2 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 // Forces a DisconnectFromHost() in case there is any active or failed 100 // Forces a DisconnectFromHost() in case there is any active or failed
101 // connection, then proceeds to tear down the Chromium dependencies on which 101 // connection, then proceeds to tear down the Chromium dependencies on which
102 // all sessions depended. Because destruction only occurs at application exit 102 // all sessions depended. Because destruction only occurs at application exit
103 // after all connections have terminated, it is safe to make unretained 103 // after all connections have terminated, it is safe to make unretained
104 // cross-thread calls on the class. 104 // cross-thread calls on the class.
105 virtual ~ChromotingJniRuntime(); 105 virtual ~ChromotingJniRuntime();
106 106
107 // Detaches JVM from the current thread, then signals. Doesn't own |waiter|. 107 // Detaches JVM from the current thread, then signals. Doesn't own |waiter|.
108 void DetachFromVmAndSignal(base::WaitableEvent* waiter); 108 void DetachFromVmAndSignal(base::WaitableEvent* waiter);
109 109
110 // Reference to the Java class into which we make JNI calls.
111 jclass class_;
112
113 // Used by the Chromium libraries to clean up the base and net libraries' JNI 110 // Used by the Chromium libraries to clean up the base and net libraries' JNI
114 // bindings. It must persist for the lifetime of the singleton. 111 // bindings. It must persist for the lifetime of the singleton.
115 scoped_ptr<base::AtExitManager> at_exit_manager_; 112 scoped_ptr<base::AtExitManager> at_exit_manager_;
116 113
117 // Chromium code's connection to the Java message loop. 114 // Chromium code's connection to the Java message loop.
118 scoped_ptr<base::MessageLoopForUI> ui_loop_; 115 scoped_ptr<base::MessageLoopForUI> ui_loop_;
119 116
120 // References to native threads. 117 // References to native threads.
121 scoped_refptr<AutoThreadTaskRunner> ui_task_runner_; 118 scoped_refptr<AutoThreadTaskRunner> ui_task_runner_;
122 scoped_refptr<AutoThreadTaskRunner> network_task_runner_; 119 scoped_refptr<AutoThreadTaskRunner> network_task_runner_;
123 scoped_refptr<AutoThreadTaskRunner> display_task_runner_; 120 scoped_refptr<AutoThreadTaskRunner> display_task_runner_;
124 121
125 scoped_refptr<net::URLRequestContextGetter> url_requester_; 122 scoped_refptr<net::URLRequestContextGetter> url_requester_;
126 123
127 // Contains all connection-specific state. 124 // Contains all connection-specific state.
128 scoped_refptr<ChromotingJniInstance> session_; 125 scoped_refptr<ChromotingJniInstance> session_;
129 126
130 friend struct DefaultSingletonTraits<ChromotingJniRuntime>; 127 friend struct DefaultSingletonTraits<ChromotingJniRuntime>;
131 128
132 DISALLOW_COPY_AND_ASSIGN(ChromotingJniRuntime); 129 DISALLOW_COPY_AND_ASSIGN(ChromotingJniRuntime);
133 }; 130 };
134 131
135 } // namespace remoting 132 } // namespace remoting
136 133
137 #endif 134 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698