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

Unified Diff: remoting/client/jni/chromoting_jni_runtime.h

Issue 1764503002: Adding container class for chromoting client runtimes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moving usage comment to .h file. Now more simple. Created 4 years, 9 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
Index: remoting/client/jni/chromoting_jni_runtime.h
diff --git a/remoting/client/jni/chromoting_jni_runtime.h b/remoting/client/jni/chromoting_jni_runtime.h
index af2c4094c8e81df8b2bcbe5e7852af2b299d9618..eb75b54c6827dfc680db5474fdc4a0d761705643 100644
--- a/remoting/client/jni/chromoting_jni_runtime.h
+++ b/remoting/client/jni/chromoting_jni_runtime.h
@@ -12,6 +12,7 @@
#include "base/macros.h"
#include "net/url_request/url_request_context_getter.h"
#include "remoting/base/auto_thread.h"
+#include "remoting/client/chromoting_client_runtime.h"
#include "remoting/client/jni/chromoting_jni_instance.h"
#include "remoting/protocol/connection_to_host.h"
@@ -34,19 +35,19 @@ class ChromotingJniRuntime {
static ChromotingJniRuntime* GetInstance();
scoped_refptr<AutoThreadTaskRunner> ui_task_runner() {
- return ui_task_runner_;
+ return runtime_->ui_task_runner();
}
scoped_refptr<AutoThreadTaskRunner> network_task_runner() {
- return network_task_runner_;
+ return runtime_->network_task_runner();
}
scoped_refptr<AutoThreadTaskRunner> display_task_runner() {
- return display_task_runner_;
+ return runtime_->display_task_runner();
}
scoped_refptr<net::URLRequestContextGetter> url_requester() {
- return url_requester_;
+ return runtime_->url_requester();
}
// Initiates a connection with the specified host. Only call when a host
@@ -126,15 +127,13 @@ class ChromotingJniRuntime {
// Detaches JVM from the current thread, then signals. Doesn't own |waiter|.
void DetachFromVmAndSignal(base::WaitableEvent* waiter);
- // Chromium code's connection to the Java message loop.
+ // Chromium code's connection to the app message loop. Once created the
+ // MessageLoop will live for the life of the program.
scoped_ptr<base::MessageLoopForUI> ui_loop_;
- // References to native threads.
- scoped_refptr<AutoThreadTaskRunner> ui_task_runner_;
- scoped_refptr<AutoThreadTaskRunner> network_task_runner_;
- scoped_refptr<AutoThreadTaskRunner> display_task_runner_;
-
- scoped_refptr<net::URLRequestContextGetter> url_requester_;
+ // Contains threads.
+ //
+ scoped_ptr<ChromotingClientRuntime> runtime_;
// Contains all connection-specific state.
scoped_refptr<ChromotingJniInstance> session_;
« no previous file with comments | « remoting/client/chromoting_client_runtime_unittest.cc ('k') | remoting/client/jni/chromoting_jni_runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698