Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1193)

Side by Side Diff: win8/metro_driver/toast_notification_handler.h

Issue 10875008: Integrate the Windows 8 code into the Chromium tree. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove conflicting OWNERS file. Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « win8/metro_driver/stdafx.h ('k') | win8/metro_driver/toast_notification_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2012 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_UI_METRO_DRIVER_TOAST_NOTIFICATION_HANDLER_H_
6 #define CHROME_BROWSER_UI_METRO_DRIVER_TOAST_NOTIFICATION_HANDLER_H_
7
8 #include <windows.ui.notifications.h>
9
10 #include "base/string16.h"
11
12 // Provides functionality to display a metro style toast notification.
13 class ToastNotificationHandler {
14 public:
15 // Holds information about a desktop notification to be displayed.
16 struct DesktopNotification {
17 std::string origin_url;
18 std::string icon_url;
19 string16 title;
20 string16 body;
21 string16 display_source;
22 std::string id;
23
24 DesktopNotification(const char* notification_origin,
25 const char* notification_icon,
26 const wchar_t* notification_title,
27 const wchar_t* notification_body,
28 const wchar_t* notification_display_source,
29 const char* notification_id);
30 };
31
32 ToastNotificationHandler();
33 ~ToastNotificationHandler();
34
35 void DisplayNotification(const DesktopNotification& notification);
36 void CancelNotification();
37
38 HRESULT OnActivate(winui::Notifications::IToastNotification* notification,
39 IInspectable* inspectable);
40
41 private:
42 mswr::ComPtr<winui::Notifications::IToastNotifier> notifier_;
43 mswr::ComPtr<winui::Notifications::IToastNotification> notification_;
44
45 EventRegistrationToken activated_token_;
46 };
47
48 #endif // CHROME_BROWSER_UI_METRO_DRIVER_TOAST_NOTIFICATION_HANDLER_H_
OLDNEW
« no previous file with comments | « win8/metro_driver/stdafx.h ('k') | win8/metro_driver/toast_notification_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698