blob: 8e7025ae41fab84768b2681eee69eab99de93e1f [file] [log] [blame]
miguelg87e986d2016-07-08 18:04:441// Copyright 2016 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef CHROME_BROWSER_NOTIFICATIONS_NON_PERSISTENT_NOTIFICATION_HANDLER_H_
6#define CHROME_BROWSER_NOTIFICATIONS_NON_PERSISTENT_NOTIFICATION_HANDLER_H_
7
miguelg87e986d2016-07-08 18:04:448#include "base/macros.h"
miguelg87e986d2016-07-08 18:04:449#include "chrome/browser/notifications/notification_handler.h"
10
miguelg87e986d2016-07-08 18:04:4411// NotificationHandler implementation for non persistent notifications.
12class NonPersistentNotificationHandler : public NotificationHandler {
13 public:
14 NonPersistentNotificationHandler();
15 ~NonPersistentNotificationHandler() override;
16
17 // NotificationHandler implementation
miguelgabf610a2017-06-02 17:31:4318 void OnShow(Profile* profile, const std::string& notification_id) override;
miguelg87e986d2016-07-08 18:04:4419 void OnClose(Profile* profile,
Evan Stade7e48597c2017-11-03 22:04:4820 const GURL& origin,
miguelg87e986d2016-07-08 18:04:4421 const std::string& notification_id,
Peter Beverloo64337af2017-11-21 18:04:0222 bool by_user,
23 base::OnceClosure completed_closure) override;
miguelg87e986d2016-07-08 18:04:4424 void OnClick(Profile* profile,
Evan Stade7e48597c2017-11-03 22:04:4825 const GURL& origin,
miguelg87e986d2016-07-08 18:04:4426 const std::string& notification_id,
Peter Beverlooae64ba92017-09-08 21:02:4527 const base::Optional<int>& action_index,
Peter Beverloo64337af2017-11-21 18:04:0228 const base::Optional<base::string16>& reply,
29 base::OnceClosure completed_closure) override;
Peter Beverloo884488b2017-12-05 18:20:2830 void DisableNotifications(Profile* profile, const GURL& origin) override;
31 void OpenSettings(Profile* profile, const GURL& origin) override;
miguelg87e986d2016-07-08 18:04:4432
miguelg87e986d2016-07-08 18:04:4433 private:
miguelg87e986d2016-07-08 18:04:4434 DISALLOW_COPY_AND_ASSIGN(NonPersistentNotificationHandler);
35};
36
37#endif // CHROME_BROWSER_NOTIFICATIONS_NON_PERSISTENT_NOTIFICATION_HANDLER_H_