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

Side by Side Diff: chrome/browser/notifications/notification_conversion_helper.h

Issue 441753002: Route newly created notifications to notification provider API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 4 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
OLDNEW
(Empty)
1 // Copyright 2014 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_NOTIFICATIONS_NOTIFICATION_CONVERSION_HELPER_H_
6 #define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_CONVERSION_HELPER_H_
7
8 #include "chrome/browser/notifications/notification.h"
9 #include "ui/message_center/notification_types.h"
10
11 namespace extensions {
12 namespace api {
13 namespace notifications {
14 struct NotificationOptions;
15 struct NotificationBitmap;
16 } // namespace notifications
17 } // namespace api
18 } // namespace extensions
19
20 namespace gfx {
21 class Image;
22 }
23
24 class NotificationConversionHelper {
25 public:
26 // Converts Notification::Notification data to
27 // extensions::api::notifications::NotificationOptions.
28 static void NotificationToNotificationOptions(
29 const Notification& notification,
30 extensions::api::notifications::NotificationOptions* options);
31
32 private:
33 // Converts gfx::Image type to
34 // extensions::api::notifications::NotificationBitmap type.
35 static void GfxImageToNotificationBitmap(
36 const gfx::Image* gfx_image,
37 extensions::api::notifications::NotificationBitmap* return_image_args);
38
39 // Conversts message_center::NotificationType to string type used to convert
40 // to extensions::api::notifications::TemplateType
41 static std::string MapTypeToString(message_center::NotificationType type);
42 };
43
44 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_CONVERSION_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698