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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/notifications/ActionInfo.java

Issue 2440483002: Combine action parameters sent to Android displayNotification (Closed)
Patch Set: Comments Created 4 years, 2 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: chrome/android/java/src/org/chromium/chrome/browser/notifications/ActionInfo.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/notifications/ActionInfo.java b/chrome/android/java/src/org/chromium/chrome/browser/notifications/ActionInfo.java
new file mode 100644
index 0000000000000000000000000000000000000000..8394f15e6b2302d6e5bacf343ea876b02deb6c18
--- /dev/null
+++ b/chrome/android/java/src/org/chromium/chrome/browser/notifications/ActionInfo.java
@@ -0,0 +1,32 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package org.chromium.chrome.browser.notifications;
+
+import android.graphics.Bitmap;
+
+import org.chromium.base.annotations.CalledByNative;
+
+/**
+ * Helper class for passing notification action information over the JNI.
+ */
+class ActionInfo {
+ public final String title;
+ public final Bitmap icon;
+ public final int type;
+ public final String placeholder;
+
+ private ActionInfo(String title, Bitmap icon, int type, String placeholder) {
+ this.title = title;
+ this.icon = icon;
+ this.type = type;
+ this.placeholder = placeholder;
+ }
+
+ @CalledByNative
+ private static ActionInfo createActionInfo(
+ String title, Bitmap icon, int type, String placeholder) {
+ return new ActionInfo(title, icon, type, placeholder);
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698