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

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

Issue 2000803003: Use std::unique_ptr for base::DictionaryValue and base::ListValue's internal store. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix various builds. Created 4 years, 6 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
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_METHOD_INVOCATION_HELPER_H_ 5 #ifndef CONTENT_BROWSER_ANDROID_JAVA_GIN_JAVA_METHOD_INVOCATION_HELPER_H_
6 #define CONTENT_BROWSER_ANDROID_JAVA_GIN_JAVA_METHOD_INVOCATION_HELPER_H_ 6 #define CONTENT_BROWSER_ANDROID_JAVA_GIN_JAVA_METHOD_INVOCATION_HELPER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 const base::ListValue& GetPrimitiveResult(); 66 const base::ListValue& GetPrimitiveResult();
67 const base::android::JavaRef<jobject>& GetObjectResult(); 67 const base::android::JavaRef<jobject>& GetObjectResult();
68 const base::android::JavaRef<jclass>& GetSafeAnnotationClass(); 68 const base::android::JavaRef<jclass>& GetSafeAnnotationClass();
69 GinJavaBridgeError GetInvocationError(); 69 GinJavaBridgeError GetInvocationError();
70 70
71 private: 71 private:
72 friend class base::RefCountedThreadSafe<GinJavaMethodInvocationHelper>; 72 friend class base::RefCountedThreadSafe<GinJavaMethodInvocationHelper>;
73 ~GinJavaMethodInvocationHelper(); 73 ~GinJavaMethodInvocationHelper();
74 74
75 void BuildObjectRefsFromListValue(DispatcherDelegate* dispatcher, 75 void BuildObjectRefsFromListValue(DispatcherDelegate* dispatcher,
76 const base::Value* list_value); 76 const base::Value& list_value);
77 void BuildObjectRefsFromDictionaryValue(DispatcherDelegate* dispatcher, 77 void BuildObjectRefsFromDictionaryValue(DispatcherDelegate* dispatcher,
78 const base::Value* dict_value); 78 const base::Value& dict_value);
79 79
80 bool AppendObjectRef(DispatcherDelegate* dispatcher, 80 bool AppendObjectRef(DispatcherDelegate* dispatcher,
81 const base::Value* raw_value); 81 const base::Value& raw_value);
82 82
83 void InvokeMethod(jobject object, 83 void InvokeMethod(jobject object,
84 jclass clazz, 84 jclass clazz,
85 const JavaType& return_type, 85 const JavaType& return_type,
86 jmethodID id, 86 jmethodID id,
87 jvalue* parameters); 87 jvalue* parameters);
88 void SetInvocationError(GinJavaBridgeError error); 88 void SetInvocationError(GinJavaBridgeError error);
89 void SetPrimitiveResult(const base::ListValue& result_wrapper); 89 void SetPrimitiveResult(const base::ListValue& result_wrapper);
90 void SetObjectResult( 90 void SetObjectResult(
91 const base::android::JavaRef<jobject>& object, 91 const base::android::JavaRef<jobject>& object,
(...skipping 11 matching lines...) Expand all
103 GinJavaBridgeError invocation_error_; 103 GinJavaBridgeError invocation_error_;
104 base::android::ScopedJavaGlobalRef<jobject> object_result_; 104 base::android::ScopedJavaGlobalRef<jobject> object_result_;
105 base::android::ScopedJavaGlobalRef<jclass> safe_annotation_clazz_; 105 base::android::ScopedJavaGlobalRef<jclass> safe_annotation_clazz_;
106 106
107 DISALLOW_COPY_AND_ASSIGN(GinJavaMethodInvocationHelper); 107 DISALLOW_COPY_AND_ASSIGN(GinJavaMethodInvocationHelper);
108 }; 108 };
109 109
110 } // namespace content 110 } // namespace content
111 111
112 #endif // CONTENT_BROWSER_ANDROID_JAVA_GIN_JAVA_METHOD_INVOCATION_HELPER_H_ 112 #endif // CONTENT_BROWSER_ANDROID_JAVA_GIN_JAVA_METHOD_INVOCATION_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698