OLD | NEW |
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_RENDERER_HOST_JAVA_GIN_JAVA_BOUND_OBJECT_H_ | 5 #ifndef CONTENT_BROWSER_ANDROID_JAVA_GIN_JAVA_BOUND_OBJECT_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_JAVA_GIN_JAVA_BOUND_OBJECT_H_ | 6 #define CONTENT_BROWSER_ANDROID_JAVA_GIN_JAVA_BOUND_OBJECT_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 | 10 |
11 #include "base/android/jni_weak_ref.h" | 11 #include "base/android/jni_weak_ref.h" |
12 #include "base/android/scoped_java_ref.h" | 12 #include "base/android/scoped_java_ref.h" |
13 #include "base/id_map.h" | 13 #include "base/id_map.h" |
14 #include "base/memory/linked_ptr.h" | 14 #include "base/memory/linked_ptr.h" |
15 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
16 #include "base/memory/weak_ptr.h" | 16 #include "base/memory/weak_ptr.h" |
17 #include "base/values.h" | 17 #include "base/values.h" |
18 #include "content/browser/renderer_host/java/java_method.h" | 18 #include "content/browser/android/java/java_method.h" |
19 | 19 |
20 namespace content { | 20 namespace content { |
21 | 21 |
22 class RenderFrameHost; | 22 class RenderFrameHost; |
23 | 23 |
24 class GinJavaBoundObject | 24 class GinJavaBoundObject |
25 : public base::RefCountedThreadSafe<GinJavaBoundObject> { | 25 : public base::RefCountedThreadSafe<GinJavaBoundObject> { |
26 public: | 26 public: |
27 // Using scoped_refptr<> as a value type is somewhat not IDMap had been | 27 // Using scoped_refptr<> as a value type is somewhat not IDMap had been |
28 // designed for (it returns T* from lookups, so we have to de-ref it), but on | 28 // designed for (it returns T* from lookups, so we have to de-ref it), but on |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 // The following fields are accessed on the background thread. | 86 // The following fields are accessed on the background thread. |
87 typedef std::multimap<std::string, linked_ptr<JavaMethod> > JavaMethodMap; | 87 typedef std::multimap<std::string, linked_ptr<JavaMethod> > JavaMethodMap; |
88 JavaMethodMap methods_; | 88 JavaMethodMap methods_; |
89 jmethodID object_get_class_method_id_; | 89 jmethodID object_get_class_method_id_; |
90 bool are_methods_set_up_; | 90 bool are_methods_set_up_; |
91 base::android::ScopedJavaGlobalRef<jclass> safe_annotation_clazz_; | 91 base::android::ScopedJavaGlobalRef<jclass> safe_annotation_clazz_; |
92 }; | 92 }; |
93 | 93 |
94 } // namespace content | 94 } // namespace content |
95 | 95 |
96 #endif // CONTENT_BROWSER_RENDERER_HOST_JAVA_GIN_JAVA_BOUND_OBJECT_H_ | 96 #endif // CONTENT_BROWSER_ANDROID_JAVA_GIN_JAVA_BOUND_OBJECT_H_ |
OLD | NEW |