OLD | NEW |
(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_ |
OLD | NEW |