summaryrefslogtreecommitdiff
path: root/chromium/content/public/browser/platform_notification_context.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/content/public/browser/platform_notification_context.h')
-rw-r--r--chromium/content/public/browser/platform_notification_context.h26
1 files changed, 23 insertions, 3 deletions
diff --git a/chromium/content/public/browser/platform_notification_context.h b/chromium/content/public/browser/platform_notification_context.h
index 71da1d11c7a..973fbeafe24 100644
--- a/chromium/content/public/browser/platform_notification_context.h
+++ b/chromium/content/public/browser/platform_notification_context.h
@@ -38,12 +38,31 @@ class PlatformNotificationContext
using DeleteResultCallback = base::Callback<void(bool /* success */)>;
+ // Reasons for updating a notification, triggering a read.
+ enum class Interaction {
+ // No interaction was taken with the notification.
+ NONE,
+
+ // An action button in the notification was clicked.
+ ACTION_BUTTON_CLICKED,
+
+ // The notification itself was clicked.
+ CLICKED,
+
+ // The notification was closed.
+ CLOSED
+ };
+
// Reads the data associated with |notification_id| belonging to |origin|
// from the database. |callback| will be invoked with the success status
// and a reference to the notification database data when completed.
- virtual void ReadNotificationData(const std::string& notification_id,
- const GURL& origin,
- const ReadResultCallback& callback) = 0;
+ // |interaction| is passed in for UKM logging purposes and does not
+ // otherwise affect the read.
+ virtual void ReadNotificationDataAndRecordInteraction(
+ const std::string& notification_id,
+ const GURL& origin,
+ Interaction interaction,
+ const ReadResultCallback& callback) = 0;
// Reads all data associated with |service_worker_registration_id| belonging
// to |origin| from the database. |callback| will be invoked with the success
@@ -58,6 +77,7 @@ class PlatformNotificationContext
// the notification id when written successfully. The notification ID field
// for |database_data| will be generated, and thus must be empty.
virtual void WriteNotificationData(
+ int64_t persistent_notification_id,
const GURL& origin,
const NotificationDatabaseData& database_data,
const WriteResultCallback& callback) = 0;