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

Unified 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: bug fix 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/notifications/notification_conversion_helper.h
diff --git a/chrome/browser/notifications/notification_conversion_helper.h b/chrome/browser/notifications/notification_conversion_helper.h
new file mode 100644
index 0000000000000000000000000000000000000000..1e2439a9363aba4512277f7c3f37843dbe862936
--- /dev/null
+++ b/chrome/browser/notifications/notification_conversion_helper.h
@@ -0,0 +1,33 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_CONVERSION_HELPER_H_
+#define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_CONVERSION_HELPER_H_
+
+#include "base/values.h"
dewittj 2014/08/09 00:29:52 We don't need all these include files. You can re
liyanhou 2014/08/11 17:21:10 Done. I didn't know that. That's great. Thank you
+#include "chrome/browser/notifications/notification.h"
+#include "chrome/common/extensions/api/notifications.h"
+#include "ui/gfx/image/image.h"
+#include "ui/gfx/image/image_skia.h"
+#include "ui/message_center/notification_types.h"
+
+class NotificationConversionHelper {
dewittj 2014/08/09 00:29:52 Probably this class can just be a container for st
liyanhou 2014/08/11 17:21:10 Done.
+ public:
+ NotificationConversionHelper();
+
+ ~NotificationConversionHelper();
+
+ void NotificationToNotificationOptions(
+ const Notification& notification,
+ extensions::api::notifications::NotificationOptions* options);
+
+ private:
+ void GfxImageToNotificationBitmap(
+ const gfx::Image* gfx_image,
+ extensions::api::notifications::NotificationBitmap* return_image_args);
+
+ std::string MapTypeToString(message_center::NotificationType type);
+};
+
+#endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_CONVERSION_HELPER_H_

Powered by Google App Engine
This is Rietveld 408576698