forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
notification_activator.h
42 lines (32 loc) · 1.42 KB
/
notification_activator.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
41
42
// 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 NOTIFICATION_HELPER_NOTIFICATION_ACTIVATOR_H_
#define NOTIFICATION_HELPER_NOTIFICATION_ACTIVATOR_H_
#include <NotificationActivationCallback.h>
#include <wrl/implements.h>
#include "base/macros.h"
namespace notification_helper {
// This class is used to create a COM component that exposes the
// INotificationActivationCallback interface, which is required for a Win32
// app to participate with Windows Action Center.
class NotificationActivator
: public Microsoft::WRL::RuntimeClass<
Microsoft::WRL::RuntimeClassFlags<Microsoft::WRL::ClassicCom>,
INotificationActivationCallback> {
public:
NotificationActivator() = default;
// Called when a user interacts with a toast in the Windows action center.
// For the meaning of the input parameters, see
// https://msdn.microsoft.com/library/windows/desktop/mt643712.aspx
IFACEMETHODIMP Activate(LPCWSTR app_user_model_id,
LPCWSTR invoked_args,
const NOTIFICATION_USER_INPUT_DATA* data,
ULONG count) override;
protected:
~NotificationActivator() override;
private:
DISALLOW_COPY_AND_ASSIGN(NotificationActivator);
};
} // namespace notification_helper
#endif // NOTIFICATION_HELPER_NOTIFICATION_ACTIVATOR_H_