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

Unified Diff: ui/gfx/android/java_bitmap.h

Issue 1620203004: Notification action icons prototype. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make it work on Android and clean up. Created 4 years, 11 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: ui/gfx/android/java_bitmap.h
diff --git a/ui/gfx/android/java_bitmap.h b/ui/gfx/android/java_bitmap.h
index 97f85d407304f76898edd61f3bb78d458e1a9d84..02b0ab52e95bbb8121b11d629b7114a5ea1f1d08 100644
--- a/ui/gfx/android/java_bitmap.h
+++ b/ui/gfx/android/java_bitmap.h
@@ -7,6 +7,7 @@
#include <jni.h>
#include <stdint.h>
+#include <vector>
#include "base/android/scoped_java_ref.h"
#include "base/macros.h"
@@ -68,6 +69,13 @@ GFX_EXPORT base::android::ScopedJavaLocalRef<jobject> CreateJavaBitmap(
GFX_EXPORT base::android::ScopedJavaLocalRef<jobject> ConvertToJavaBitmap(
const SkBitmap* skbitmap);
+// Converts |skbitmaps| to an array of Java-backed bitmaps
+// (android.graphics.Bitmap). If an input bitmap is null or empty, its
+// corresponding output bitmap is null. If an input bitmap is non-null and
+// non-empty, it is assumed to be in RGBA_8888 or RGB_565 format.
+GFX_EXPORT base::android::ScopedJavaLocalRef<jobjectArray> ConvertToJavaBitmaps(
+ const std::vector<SkBitmap>& skbitmaps);
+
// Converts |bitmap| to an SkBitmap of the same size and format.
// Note: |jbitmap| is assumed to be non-null, non-empty and of format RGBA_8888.
GFX_EXPORT SkBitmap CreateSkBitmapFromJavaBitmap(const JavaBitmap& jbitmap);
« no previous file with comments | « third_party/WebKit/public/platform/modules/notifications/WebNotificationAction.h ('k') | ui/gfx/android/java_bitmap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698