#include "chrome/browser/send_tab_to_self/desktop_notification_handler.h"
#include <string>
#include <utility>
#include "base/strings/utf_string_conversions.h"
#include "base/uuid.h"
#include "chrome/browser/notifications/notification_display_service.h"
#include "chrome/browser/notifications/notification_display_service_factory.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/sync/send_tab_to_self_sync_service_factory.h"
#include "chrome/browser/ui/browser_navigator.h"
#include "chrome/browser/ui/browser_navigator_params.h"
#include "components/send_tab_to_self/metrics_util.h"
#include "components/send_tab_to_self/send_tab_to_self_entry.h"
#include "components/send_tab_to_self/send_tab_to_self_model.h"
#include "components/send_tab_to_self/send_tab_to_self_sync_service.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/page_transition_types.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/image/image.h"
#include "ui/message_center/public/cpp/notification.h"
#include "ui/strings/grit/ui_strings.h"
namespace send_tab_to_self {
namespace {
const char kDesktopNotificationSharedPrefix[] = …;
}
DesktopNotificationHandler::DesktopNotificationHandler(Profile* profile)
: … { … }
DesktopNotificationHandler::~DesktopNotificationHandler() = default;
void DesktopNotificationHandler::DisplayNewEntries(
const std::vector<const SendTabToSelfEntry*>& new_entries) { … }
void DesktopNotificationHandler::DismissEntries(
const std::vector<std::string>& guids) { … }
void DesktopNotificationHandler::OnClose(Profile* profile,
const GURL& origin,
const std::string& notification_id,
bool by_user,
base::OnceClosure completed_closure) { … }
void DesktopNotificationHandler::OnClick(
Profile* profile,
const GURL& origin,
const std::string& notification_id,
const std::optional<int>& action_index,
const std::optional<std::u16string>& reply,
base::OnceClosure completed_closure) { … }
void DesktopNotificationHandler::DisplaySendingConfirmation(
const SendTabToSelfEntry& entry,
const std::string& target_device_name) { … }
void DesktopNotificationHandler::DisplayFailureMessage(const GURL& url) { … }
const Profile* DesktopNotificationHandler::profile() const { … }
}