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

Side by Side Diff: content/common/platform_notification_messages.h

Issue 1898153002: Migrate notifications to use the PermissionStatus enum (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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 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 // Messages for platform-native notifications using the Web Notification API. 5 // Messages for platform-native notifications using the Web Notification API.
6 // Multiply-included message file, hence no include guard. 6 // Multiply-included message file, hence no include guard.
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
11 #include <vector> 11 #include <vector>
12 12
13 #include "content/public/common/notification_resources.h" 13 #include "content/public/common/notification_resources.h"
14 #include "content/public/common/platform_notification_data.h" 14 #include "content/public/common/platform_notification_data.h"
15 #include "ipc/ipc_message_macros.h" 15 #include "ipc/ipc_message_macros.h"
16 #include "third_party/WebKit/public/platform/modules/notifications/WebNotificati onPermission.h" 16 #include "third_party/WebKit/public/platform/modules/permissions/permission_stat us.mojom.h"
17 #include "third_party/skia/include/core/SkBitmap.h" 17 #include "third_party/skia/include/core/SkBitmap.h"
18 18
19 // Singly-included section for type definitions. 19 // Singly-included section for type definitions.
20 #ifndef CONTENT_COMMON_PLATFORM_NOTIFICATION_MESSAGES_H_ 20 #ifndef CONTENT_COMMON_PLATFORM_NOTIFICATION_MESSAGES_H_
21 #define CONTENT_COMMON_PLATFORM_NOTIFICATION_MESSAGES_H_ 21 #define CONTENT_COMMON_PLATFORM_NOTIFICATION_MESSAGES_H_
22 22
23 // Defines the pair of [persistent notification id] => [notification data] used 23 // Defines the pair of [persistent notification id] => [notification data] used
24 // when getting the notifications for a given Service Worker registration. 24 // when getting the notifications for a given Service Worker registration.
25 using PersistentNotificationInfo = 25 using PersistentNotificationInfo =
26 std::pair<int64_t, content::PlatformNotificationData>; 26 std::pair<int64_t, content::PlatformNotificationData>;
27 27
28 #endif // CONTENT_COMMON_PLATFORM_NOTIFICATION_MESSAGES_H_ 28 #endif // CONTENT_COMMON_PLATFORM_NOTIFICATION_MESSAGES_H_
29 29
30 #define IPC_MESSAGE_START PlatformNotificationMsgStart 30 #define IPC_MESSAGE_START PlatformNotificationMsgStart
31 31
32 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebNotificationPermission, 32 IPC_ENUM_TRAITS_MAX_VALUE(blink::mojom::PermissionStatus,
33 blink::WebNotificationPermissionLast) 33 blink::mojom::PermissionStatus::LAST)
34 34
35 IPC_ENUM_TRAITS_MAX_VALUE( 35 IPC_ENUM_TRAITS_MAX_VALUE(
36 content::PlatformNotificationData::Direction, 36 content::PlatformNotificationData::Direction,
37 content::PlatformNotificationData::DIRECTION_LAST) 37 content::PlatformNotificationData::DIRECTION_LAST)
38 38
39 IPC_ENUM_TRAITS_MAX_VALUE(content::PlatformNotificationActionType, 39 IPC_ENUM_TRAITS_MAX_VALUE(content::PlatformNotificationActionType,
40 content::PLATFORM_NOTIFICATION_ACTION_TYPE_TEXT) 40 content::PLATFORM_NOTIFICATION_ACTION_TYPE_TEXT)
41 41
42 IPC_STRUCT_TRAITS_BEGIN(content::PlatformNotificationAction) 42 IPC_STRUCT_TRAITS_BEGIN(content::PlatformNotificationAction)
43 IPC_STRUCT_TRAITS_MEMBER(type) 43 IPC_STRUCT_TRAITS_MEMBER(type)
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 GURL /* origin */, 121 GURL /* origin */,
122 std::string /* filter_tag */) 122 std::string /* filter_tag */)
123 123
124 IPC_MESSAGE_CONTROL1(PlatformNotificationHostMsg_Close, 124 IPC_MESSAGE_CONTROL1(PlatformNotificationHostMsg_Close,
125 int /* notification_id */) 125 int /* notification_id */)
126 126
127 IPC_MESSAGE_CONTROL2(PlatformNotificationHostMsg_ClosePersistent, 127 IPC_MESSAGE_CONTROL2(PlatformNotificationHostMsg_ClosePersistent,
128 GURL /* origin */, 128 GURL /* origin */,
129 int64_t /* persistent_notification_id */) 129 int64_t /* persistent_notification_id */)
130 130
131 IPC_SYNC_MESSAGE_CONTROL1_1(PlatformNotificationHostMsg_CheckPermission, 131 IPC_SYNC_MESSAGE_CONTROL1_1(
132 GURL /* origin */, 132 PlatformNotificationHostMsg_CheckPermission,
133 blink::WebNotificationPermission /* result */) 133 GURL /* origin */,
134 blink::mojom::PermissionStatus /* permission_status */)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698