forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
notification.h
40 lines (30 loc) · 1.09 KB
/
notification.h
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
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef COMPONENTS_EXO_NOTIFICATION_H_
#define COMPONENTS_EXO_NOTIFICATION_H_
#include <string>
#include <vector>
#include "base/callback.h"
#include "base/optional.h"
namespace exo {
// Handles notification shown in message center.
class Notification {
public:
Notification(const std::string& title,
const std::string& message,
const std::string& display_source,
const std::string& notification_id,
const std::string& notifier_id,
const std::vector<std::string>& buttons,
const base::RepeatingCallback<void(bool)>& close_callback,
const base::RepeatingCallback<void(const base::Optional<int>&)>&
click_callback);
// Closes this notification.
void Close();
private:
const std::string notification_id_;
DISALLOW_COPY_AND_ASSIGN(Notification);
};
} // namespace exo
#endif // COMPONENTS_EXO_NOTIFICATION_H_