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

Unified Diff: base/android/jni_weak_ref.h

Issue 1647803004: Move base to DEPS (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « base/android/jni_utils.cc ('k') | base/android/jni_weak_ref.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/android/jni_weak_ref.h
diff --git a/base/android/jni_weak_ref.h b/base/android/jni_weak_ref.h
deleted file mode 100644
index c8510465698510d90d8cf200a2657a7aaf42371e..0000000000000000000000000000000000000000
--- a/base/android/jni_weak_ref.h
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef BASE_ANDROID_JNI_WEAK_REF_H_
-#define BASE_ANDROID_JNI_WEAK_REF_H_
-
-#include <jni.h>
-
-#include "base/android/scoped_java_ref.h"
-#include "base/base_export.h"
-
-// Manages WeakGlobalRef lifecycle.
-// This class is not thread-safe w.r.t. get() and reset(). Multiple threads may
-// safely use get() concurrently, but if the user calls reset() (or of course,
-// calls the destructor) they'll need to provide their own synchronization.
-class BASE_EXPORT JavaObjectWeakGlobalRef {
- public:
- JavaObjectWeakGlobalRef();
- JavaObjectWeakGlobalRef(const JavaObjectWeakGlobalRef& orig);
- JavaObjectWeakGlobalRef(JNIEnv* env, jobject obj);
- virtual ~JavaObjectWeakGlobalRef();
-
- void operator=(const JavaObjectWeakGlobalRef& rhs);
-
- base::android::ScopedJavaLocalRef<jobject> get(JNIEnv* env) const;
-
- bool is_empty() const { return obj_ == NULL; }
-
- void reset();
-
- private:
- void Assign(const JavaObjectWeakGlobalRef& rhs);
-
- jweak obj_;
-};
-
-// Get the real object stored in the weak reference returned as a
-// ScopedJavaLocalRef.
-BASE_EXPORT base::android::ScopedJavaLocalRef<jobject> GetRealObject(
- JNIEnv* env, jweak obj);
-
-#endif // BASE_ANDROID_JNI_WEAK_REF_H_
« no previous file with comments | « base/android/jni_utils.cc ('k') | base/android/jni_weak_ref.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698