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

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

Issue 1135213004: Returning error when NotificationConversionHelper::NotificationBitmapToGfxImage() get failed in not… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes as per review comments. Created 5 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 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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698