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

Unified Diff: media/base/android/android_util.h

Issue 2790783002: [Clank] Add JNI interface for media persistent license storage (Closed)
Patch Set: Created 3 years, 9 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
Index: media/base/android/android_util.h
diff --git a/media/base/android/android_util.h b/media/base/android/android_util.h
new file mode 100644
index 0000000000000000000000000000000000000000..ae0cf32aceceede8e491d7455d4e68370a725d6c
--- /dev/null
+++ b/media/base/android/android_util.h
@@ -0,0 +1,21 @@
+// Copyright (c) 2017 The Chromium Authors. All rights reserved.
xhwang 2017/03/30 23:33:42 nit: here and everywhere else, drop the (c) part
yucliu1 2017/03/31 00:57:17 Done.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include <memory>
+#include <string>
+
+#include "base/android/scoped_java_ref.h"
+
+namespace media {
+
+using JavaObjectPtr =
+ std::unique_ptr<base::android::ScopedJavaGlobalRef<jobject>>;
+
+// Converts jbyteArray (byte[] in Java) into std::string.
+std::string JavaBytesToString(JNIEnv* env, jbyteArray j_byte_array);
+
+// A helper method to create a JavaObjectPtr.
+JavaObjectPtr CreateJavaObjectPtr(jobject object);
+
+} // namespace media

Powered by Google App Engine
This is Rietveld 408576698