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

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

Issue 2142253002: [Remoting Android] Fix GetWeakPtr() calls on multiple threads (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « remoting/client/jni/jni_client.cc ('k') | remoting/client/jni/jni_display_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_JNI_DISPLAY_HANDLER_H_ 5 #ifndef REMOTING_CLIENT_JNI_JNI_DISPLAY_HANDLER_H_
6 #define REMOTING_CLIENT_JNI_JNI_DISPLAY_HANDLER_H_ 6 #define REMOTING_CLIENT_JNI_JNI_DISPLAY_HANDLER_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 9
10 #include "base/android/scoped_java_ref.h" 10 #include "base/android/scoped_java_ref.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 static bool RegisterJni(JNIEnv* env); 53 static bool RegisterJni(JNIEnv* env);
54 54
55 // Schedule redraw. Can be called on any thread. 55 // Schedule redraw. Can be called on any thread.
56 void ScheduleRedraw(JNIEnv* env, 56 void ScheduleRedraw(JNIEnv* env,
57 const base::android::JavaParamRef<jobject>& caller); 57 const base::android::JavaParamRef<jobject>& caller);
58 58
59 private: 59 private:
60 ChromotingJniRuntime* runtime_; 60 ChromotingJniRuntime* runtime_;
61 61
62 base::android::ScopedJavaGlobalRef<jobject> java_display_; 62 base::android::ScopedJavaGlobalRef<jobject> java_display_;
63 base::WeakPtr<JniDisplayHandler> weak_ptr_;
63 base::WeakPtrFactory<JniDisplayHandler> weak_factory_; 64 base::WeakPtrFactory<JniDisplayHandler> weak_factory_;
64 65
65 DISALLOW_COPY_AND_ASSIGN(JniDisplayHandler); 66 DISALLOW_COPY_AND_ASSIGN(JniDisplayHandler);
66 }; 67 };
67 68
68 } // namespace remoting 69 } // namespace remoting
69 70
70 #endif // REMOTING_CLIENT_JNI_JNI_DISPLAY_HANDLER_H_ 71 #endif // REMOTING_CLIENT_JNI_JNI_DISPLAY_HANDLER_H_
OLDNEW
« no previous file with comments | « remoting/client/jni/jni_client.cc ('k') | remoting/client/jni/jni_display_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698