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

Unified Diff: content/browser/notifications/type_converters.h

Issue 1898193003: Add type converters from Mojo notifications to the content types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@notification-permission-mojom
Patch Set: Created 4 years, 8 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: content/browser/notifications/type_converters.h
diff --git a/content/browser/notifications/type_converters.h b/content/browser/notifications/type_converters.h
new file mode 100644
index 0000000000000000000000000000000000000000..955f3f1e68e4c0c4825d86f1c88e3f3d32151b18
--- /dev/null
+++ b/content/browser/notifications/type_converters.h
@@ -0,0 +1,30 @@
+// Copyright 2016 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 CONTENT_BROWSER_NOTIFICATIONS_TYPE_CONVERTERS_H_
+#define CONTENT_BROWSER_NOTIFICATIONS_TYPE_CONVERTERS_H_
+
+#include "content/common/content_export.h"
+#include "content/public/common/platform_notification_data.h"
+#include "third_party/WebKit/public/platform/modules/notifications/notification.mojom.h"
+
+namespace mojo {
+
+template <>
+struct TypeConverter<content::PlatformNotificationData,
+ blink::mojom::NotificationPtr> {
+ static CONTENT_EXPORT content::PlatformNotificationData Convert(
+ const blink::mojom::NotificationPtr& notification);
+};
+
+template <>
+struct TypeConverter<blink::mojom::NotificationPtr,
+ content::PlatformNotificationData> {
+ static CONTENT_EXPORT blink::mojom::NotificationPtr Convert(
+ const content::PlatformNotificationData& notification_data);
+};
+
+} // namespace mojo
+
+#endif // CONTENT_BROWSER_NOTIFICATIONS_TYPE_CONVERTERS_H_

Powered by Google App Engine
This is Rietveld 408576698