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

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

Issue 2753963002: Refactoring and rewriting the chromoting jni instance to be chromoting session. (Closed)
Patch Set: WeakPtr Factory now makes type ChromotingClientRuntime::Delegate. Created 3 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/jni_runtime_delegate.h
diff --git a/remoting/client/jni/jni_runtime_delegate.h b/remoting/client/jni/jni_runtime_delegate.h
index 741937b10f1ce178e81129da03df5c464c0b5ffb..823e86a2e6c1256c62f601c9d7a9ef98f06e1886 100644
--- a/remoting/client/jni/jni_runtime_delegate.h
+++ b/remoting/client/jni/jni_runtime_delegate.h
@@ -14,7 +14,7 @@
#include "remoting/base/auto_thread.h"
#include "remoting/base/telemetry_log_writer.h"
#include "remoting/client/chromoting_client_runtime.h"
-#include "remoting/client/jni/chromoting_jni_instance.h"
+#include "remoting/client/chromoting_session.h"
#include "remoting/protocol/connection_to_host.h"
namespace base {
@@ -45,6 +45,8 @@ class JniRuntimeDelegate : public ChromotingClientRuntime::Delegate {
void RuntimeDidShutdown() override;
void RequestAuthTokenForLogger() override;
+ base::WeakPtr<ChromotingClientRuntime::Delegate> GetWeakPtr();
+
private:
JniRuntimeDelegate();
@@ -60,6 +62,8 @@ class JniRuntimeDelegate : public ChromotingClientRuntime::Delegate {
ChromotingClientRuntime* runtime_;
+ base::WeakPtrFactory<ChromotingClientRuntime::Delegate> weak_factory_;
+
friend struct base::DefaultSingletonTraits<JniRuntimeDelegate>;
DISALLOW_COPY_AND_ASSIGN(JniRuntimeDelegate);

Powered by Google App Engine
This is Rietveld 408576698