1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31
   32
   33
   34
   35
   36
   37
   38
   39
   40
   41
   42
   43
   44
   45
   46

content / browser / notifications / devtools_event_logging.h [blame]

// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CONTENT_BROWSER_NOTIFICATIONS_DEVTOOLS_EVENT_LOGGING_H_
#define CONTENT_BROWSER_NOTIFICATIONS_DEVTOOLS_EVENT_LOGGING_H_

#include <optional>
#include <string>

#include "base/time/time.h"

class GURL;

namespace content {

class BrowserContext;
struct NotificationDatabaseData;

namespace notifications {

bool ShouldLogNotificationEventToDevTools(BrowserContext* browser_context,
                                          const GURL& origin);

void LogNotificationDisplayedEventToDevTools(
    BrowserContext* browser_context,
    const NotificationDatabaseData& data);

void LogNotificationClosedEventToDevTools(BrowserContext* browser_context,
                                          const NotificationDatabaseData& data);

void LogNotificationScheduledEventToDevTools(
    BrowserContext* browser_context,
    const NotificationDatabaseData& data,
    base::Time show_trigger_timestamp);

void LogNotificationClickedEventToDevTools(
    BrowserContext* browser_context,
    const NotificationDatabaseData& data,
    const std::optional<int>& action_index,
    const std::optional<std::u16string>& reply);

}  // namespace notifications
}  // namespace content

#endif  // CONTENT_BROWSER_NOTIFICATIONS_DEVTOOLS_EVENT_LOGGING_H_