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
ash / user_education / welcome_tour / welcome_tour_notification_blocker.h [blame]
// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef ASH_USER_EDUCATION_WELCOME_TOUR_WELCOME_TOUR_NOTIFICATION_BLOCKER_H_
#define ASH_USER_EDUCATION_WELCOME_TOUR_WELCOME_TOUR_NOTIFICATION_BLOCKER_H_
#include "ui/message_center/notification_blocker.h"
namespace ash {
// `WelcomeTourNotificationBlocker` blocks all notifications while it exists.
// When destroyed, assuming no other `message_center::NotificationBlocker`s
// interfere, notifications should appear in the Notification Center as normal,
// but no popups will be shown for notifications from before or during the tour,
// with the exception of system critical popups.
class WelcomeTourNotificationBlocker
: public message_center::NotificationBlocker {
public:
WelcomeTourNotificationBlocker();
WelcomeTourNotificationBlocker(const WelcomeTourNotificationBlocker&) =
delete;
WelcomeTourNotificationBlocker& operator=(
const WelcomeTourNotificationBlocker&) = delete;
~WelcomeTourNotificationBlocker() override;
private:
// message_center::NotificationBlocker:
bool ShouldShowNotification(
const message_center::Notification& notification) const override;
bool ShouldShowNotificationAsPopup(
const message_center::Notification& notification) const override;
};
} // namespace ash
#endif // ASH_USER_EDUCATION_WELCOME_TOUR_WELCOME_TOUR_NOTIFICATION_BLOCKER_H_