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

Unified Diff: win8/metro_driver/toast_notification_handler.cc

Issue 11096013: Add functionality to the Windows 8 notification display functionality to invoke a caller specified … (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « win8/metro_driver/toast_notification_handler.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: win8/metro_driver/toast_notification_handler.cc
===================================================================
--- win8/metro_driver/toast_notification_handler.cc (revision 160886)
+++ win8/metro_driver/toast_notification_handler.cc (working copy)
@@ -100,15 +100,23 @@
const wchar_t* notification_title,
const wchar_t* notification_body,
const wchar_t* notification_display_source,
- const char* notification_id)
+ const char* notification_id,
+ base::win::MetroNotificationClickedHandler handler,
+ const wchar_t* handler_context)
: origin_url(notification_origin),
icon_url(notification_icon),
title(notification_title),
body(notification_body),
display_source(notification_display_source),
- id(notification_id) {
+ id(notification_id),
+ notification_handler(handler) {
+ if (handler_context)
+ notification_context = handler_context;
}
+ToastNotificationHandler::DesktopNotification::DesktopNotification()
+ : notification_handler(NULL) {
+}
ToastNotificationHandler::ToastNotificationHandler() {
DVLOG(1) << __FUNCTION__;
@@ -128,6 +136,8 @@
DCHECK(notifier_.Get() == NULL);
DCHECK(notification_.Get() == NULL);
+ notification_info_ = notification;
+
mswr::ComPtr<winui::Notifications::IToastNotificationManagerStatics>
toast_manager;
@@ -230,5 +240,10 @@
// etc to ChromeAppView which would enable it to ensure that the
// correct tab in chrome is activated.
DVLOG(1) << __FUNCTION__;
+
+ if (notification_info_.notification_handler) {
+ notification_info_.notification_handler(
+ notification_info_.notification_context.c_str());
+ }
return S_OK;
}
« no previous file with comments | « win8/metro_driver/toast_notification_handler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698