OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 #ifndef CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_CONVERSION_HELPER_H_ | 5 #ifndef CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_CONVERSION_HELPER_H_ |
6 #define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_CONVERSION_HELPER_H_ | 6 #define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_CONVERSION_HELPER_H_ |
7 | 7 |
8 #include "chrome/browser/notifications/notification.h" | 8 #include "chrome/browser/notifications/notification.h" |
9 #include "ui/message_center/notification_types.h" | 9 #include "ui/message_center/notification_types.h" |
10 | 10 |
(...skipping 24 matching lines...) Expand all Loading... |
35 // extensions::api::notifications::NotificationBitmap type (RGBA). | 35 // extensions::api::notifications::NotificationBitmap type (RGBA). |
36 static void GfxImageToNotificationBitmap( | 36 static void GfxImageToNotificationBitmap( |
37 const gfx::Image* gfx_image, | 37 const gfx::Image* gfx_image, |
38 extensions::api::notifications::NotificationBitmap* return_image_args); | 38 extensions::api::notifications::NotificationBitmap* return_image_args); |
39 | 39 |
40 // Converts an extensions::api::notifications::NotificationBitmap type object | 40 // Converts an extensions::api::notifications::NotificationBitmap type object |
41 // with width, height, and data in RGBA format into an gfx::Image (ARGB). | 41 // with width, height, and data in RGBA format into an gfx::Image (ARGB). |
42 static bool NotificationBitmapToGfxImage( | 42 static bool NotificationBitmapToGfxImage( |
43 float max_scale, | 43 float max_scale, |
44 const gfx::Size& target_size_dips, | 44 const gfx::Size& target_size_dips, |
45 extensions::api::notifications::NotificationBitmap* notification_bitmap, | 45 const extensions::api::notifications::NotificationBitmap& |
| 46 notification_bitmap, |
46 gfx::Image* return_image); | 47 gfx::Image* return_image); |
47 | 48 |
48 private: | 49 private: |
49 // Conversts message_center::NotificationType to string type used to convert | 50 // Conversts message_center::NotificationType to string type used to convert |
50 // to extensions::api::notifications::TemplateType | 51 // to extensions::api::notifications::TemplateType |
51 static std::string MapTypeToString(message_center::NotificationType type); | 52 static std::string MapTypeToString(message_center::NotificationType type); |
52 }; | 53 }; |
53 | 54 |
54 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_CONVERSION_HELPER_H_ | 55 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_CONVERSION_HELPER_H_ |
OLD | NEW |