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

Side by Side Diff: chrome/browser/notifications/desktop_notification_service_win.cc

Issue 14631005: Enable users of NotificationUIManager to specify binary images. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase for relanding. Created 7 years, 6 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/notifications/desktop_notification_service.h" 5 #include "chrome/browser/notifications/desktop_notification_service.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/win/metro.h" 8 #include "base/win/metro.h"
9 #include "chrome/browser/notifications/notification.h" 9 #include "chrome/browser/notifications/notification.h"
10 #include "chrome/browser/notifications/notification_object_proxy.h" 10 #include "chrome/browser/notifications/notification_object_proxy.h"
(...skipping 28 matching lines...) Expand all
39 const Notification& notification) { 39 const Notification& notification) {
40 if (win8::IsSingleWindowMetroMode()) { 40 if (win8::IsSingleWindowMetroMode()) {
41 MetroDisplayNotification display_metro_notification = 41 MetroDisplayNotification display_metro_notification =
42 reinterpret_cast<MetroDisplayNotification>(GetProcAddress( 42 reinterpret_cast<MetroDisplayNotification>(GetProcAddress(
43 base::win::GetMetroModule(), "DisplayNotification")); 43 base::win::GetMetroModule(), "DisplayNotification"));
44 DCHECK(display_metro_notification); 44 DCHECK(display_metro_notification);
45 if (!notification.is_html()) { 45 if (!notification.is_html()) {
46 display_metro_notification(notification.origin_url().spec().c_str(), 46 display_metro_notification(notification.origin_url().spec().c_str(),
47 notification.content_url().spec().c_str(), 47 notification.content_url().spec().c_str(),
48 notification.title().c_str(), 48 notification.title().c_str(),
49 notification.body().c_str(), 49 notification.message().c_str(),
50 notification.display_source().c_str(), 50 notification.display_source().c_str(),
51 notification.notification_id().c_str()); 51 notification.notification_id().c_str());
52 return; 52 return;
53 } else { 53 } else {
54 NOTREACHED() << "We don't support HTML notifications in Windows 8 metro"; 54 NOTREACHED() << "We don't support HTML notifications in Windows 8 metro";
55 } 55 }
56 } 56 }
57 GetUIManager()->Add(notification, profile_); 57 GetUIManager()->Add(notification, profile_);
58 } 58 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698