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

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

Issue 1821623003: Revert of Adding container class for chromoting client runtimes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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 8dedfcbdc441ea494043393f7b14f75ea8227b65..b6128c1e2b157149f466cf32299c228a7c86d452 100644
--- a/remoting/client/jni/chromoting_jni_runtime.h
+++ b/remoting/client/jni/chromoting_jni_runtime.h
@@ -12,7 +12,6 @@
#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"
@@ -35,19 +34,19 @@ class ChromotingJniRuntime {
static ChromotingJniRuntime* GetInstance();
scoped_refptr<AutoThreadTaskRunner> ui_task_runner() {
- return runtime_->ui_task_runner();
+ return ui_task_runner_;
}
scoped_refptr<AutoThreadTaskRunner> network_task_runner() {
- return runtime_->network_task_runner();
+ return network_task_runner_;
}
scoped_refptr<AutoThreadTaskRunner> display_task_runner() {
- return runtime_->display_task_runner();
+ return display_task_runner_;
}
scoped_refptr<net::URLRequestContextGetter> url_requester() {
- return runtime_->url_requester();
+ return url_requester_;
}
// Initiates a connection with the specified host. Only call when a host
@@ -127,13 +126,15 @@ 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 app message loop. Once created the
- // MessageLoop will live for the life of the program.
+ // Chromium code's connection to the Java message loop.
scoped_ptr<base::MessageLoopForUI> ui_loop_;
- // Contains threads.
- //
- scoped_ptr<ChromotingClientRuntime> runtime_;
+ // 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 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