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

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
« no previous file with comments | « content/browser/DEPS ('k') | content/browser/notifications/type_converters.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..b9a364048b04c866120a932296cbc141e9808842
--- /dev/null
+++ b/content/browser/notifications/type_converters.h
@@ -0,0 +1,33 @@
+// 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 {
+
+// TODO(peter): Remove these converters together with the entire
+// PlatformNotificationData type.
+
+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_
« no previous file with comments | « content/browser/DEPS ('k') | content/browser/notifications/type_converters.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698