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

Side by Side Diff: content/browser/android/java/gin_java_bound_object.h

Issue 2430803003: Cleanup/ Remove linked_ptr from gin_java_base_object.h/cc (Closed)
Patch Set: Created 4 years, 2 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 | « no previous file | content/browser/android/java/gin_java_bound_object.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 CONTENT_BROWSER_ANDROID_JAVA_GIN_JAVA_BOUND_OBJECT_H_ 5 #ifndef CONTENT_BROWSER_ANDROID_JAVA_GIN_JAVA_BOUND_OBJECT_H_
6 #define CONTENT_BROWSER_ANDROID_JAVA_GIN_JAVA_BOUND_OBJECT_H_ 6 #define CONTENT_BROWSER_ANDROID_JAVA_GIN_JAVA_BOUND_OBJECT_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include <map> 11 #include <map>
12 #include <memory>
12 #include <set> 13 #include <set>
13 14
14 #include "base/android/jni_weak_ref.h" 15 #include "base/android/jni_weak_ref.h"
15 #include "base/android/scoped_java_ref.h" 16 #include "base/android/scoped_java_ref.h"
16 #include "base/memory/linked_ptr.h"
17 #include "base/memory/ref_counted.h" 17 #include "base/memory/ref_counted.h"
18 #include "base/values.h" 18 #include "base/values.h"
19 #include "content/browser/android/java/java_method.h" 19 #include "content/browser/android/java/java_method.h"
20 20
21 namespace content { 21 namespace content {
22 22
23 class GinJavaBoundObject 23 class GinJavaBoundObject
24 : public base::RefCountedThreadSafe<GinJavaBoundObject> { 24 : public base::RefCountedThreadSafe<GinJavaBoundObject> {
25 public: 25 public:
26 typedef int32_t ObjectID; 26 typedef int32_t ObjectID;
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 void EnsureMethodsAreSetUp(); 72 void EnsureMethodsAreSetUp();
73 73
74 JavaObjectWeakGlobalRef ref_; 74 JavaObjectWeakGlobalRef ref_;
75 75
76 // An object must be kept in retained_object_set_ either if it has 76 // An object must be kept in retained_object_set_ either if it has
77 // names or if it has a non-empty holders set. 77 // names or if it has a non-empty holders set.
78 int names_count_; 78 int names_count_;
79 std::set<int32_t> holders_; 79 std::set<int32_t> holders_;
80 80
81 // The following fields are accessed on the background thread. 81 // The following fields are accessed on the background thread.
82 typedef std::multimap<std::string, linked_ptr<JavaMethod> > JavaMethodMap; 82 using JavaMethodMap = std::multimap<std::string, std::unique_ptr<JavaMethod>>;
83 JavaMethodMap methods_; 83 JavaMethodMap methods_;
84 jmethodID object_get_class_method_id_; 84 jmethodID object_get_class_method_id_;
85 bool are_methods_set_up_; 85 bool are_methods_set_up_;
86 base::android::ScopedJavaGlobalRef<jclass> safe_annotation_clazz_; 86 base::android::ScopedJavaGlobalRef<jclass> safe_annotation_clazz_;
87 }; 87 };
88 88
89 } // namespace content 89 } // namespace content
90 90
91 #endif // CONTENT_BROWSER_ANDROID_JAVA_GIN_JAVA_BOUND_OBJECT_H_ 91 #endif // CONTENT_BROWSER_ANDROID_JAVA_GIN_JAVA_BOUND_OBJECT_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/android/java/gin_java_bound_object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698