blob: a7f5534f41174a2cf990d12f5fa26fde863d23ef [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,
22 bool by_user) override;
23
24 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,
28 const base::Optional<base::string16>& reply) override;
miguelg87e986d2016-07-08 18:04:4429
30 void OpenSettings(Profile* profile) override;
miguelg87e986d2016-07-08 18:04:4431
miguelg87e986d2016-07-08 18:04:4432 private:
miguelg87e986d2016-07-08 18:04:4433 DISALLOW_COPY_AND_ASSIGN(NonPersistentNotificationHandler);
34};
35
36#endif // CHROME_BROWSER_NOTIFICATIONS_NON_PERSISTENT_NOTIFICATION_HANDLER_H_