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

Side by Side Diff: content/common/android/gin_java_bridge_value.h

Issue 2065793002: Return a unique_ptr from BinaryValue::CreateWithCopiedBuffer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Android and CrOS 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_COMMON_ANDROID_GIN_JAVA_BRIDGE_VALUE_H_ 5 #ifndef CONTENT_COMMON_ANDROID_GIN_JAVA_BRIDGE_VALUE_H_
6 #define CONTENT_COMMON_ANDROID_GIN_JAVA_BRIDGE_VALUE_H_ 6 #define CONTENT_COMMON_ANDROID_GIN_JAVA_BRIDGE_VALUE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 51
52 CONTENT_EXPORT Type GetType() const; 52 CONTENT_EXPORT Type GetType() const;
53 CONTENT_EXPORT bool IsType(Type type) const; 53 CONTENT_EXPORT bool IsType(Type type) const;
54 54
55 CONTENT_EXPORT bool GetAsNonFinite(float* out_value) const; 55 CONTENT_EXPORT bool GetAsNonFinite(float* out_value) const;
56 CONTENT_EXPORT bool GetAsObjectID(int32_t* out_object_id) const; 56 CONTENT_EXPORT bool GetAsObjectID(int32_t* out_object_id) const;
57 57
58 private: 58 private:
59 explicit GinJavaBridgeValue(Type type); 59 explicit GinJavaBridgeValue(Type type);
60 explicit GinJavaBridgeValue(const base::BinaryValue* value); 60 explicit GinJavaBridgeValue(const base::BinaryValue* value);
61 base::BinaryValue* SerializeToBinaryValue(); 61 std::unique_ptr<base::BinaryValue> SerializeToBinaryValue();
62 62
63 base::Pickle pickle_; 63 base::Pickle pickle_;
64 64
65 DISALLOW_COPY_AND_ASSIGN(GinJavaBridgeValue); 65 DISALLOW_COPY_AND_ASSIGN(GinJavaBridgeValue);
66 }; 66 };
67 67
68 } // namespace content 68 } // namespace content
69 69
70 #endif // CONTENT_COMMON_ANDROID_GIN_JAVA_BRIDGE_VALUE_H_ 70 #endif // CONTENT_COMMON_ANDROID_GIN_JAVA_BRIDGE_VALUE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698