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

Side by Side Diff: third_party/WebKit/Source/modules/notifications/Notification.h

Issue 2106843005: Use SaveSameObject for Notification.data as well (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@n-action-vibrate
Patch Set: Created 4 years, 5 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 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 void prepareShow(); 134 void prepareShow();
135 135
136 // Shows the notification, using the resources loaded by the 136 // Shows the notification, using the resources loaded by the
137 // NotificationResourcesLoader. 137 // NotificationResourcesLoader.
138 void didLoadResources(NotificationResourcesLoader*); 138 void didLoadResources(NotificationResourcesLoader*);
139 139
140 void setPersistentId(int64_t persistentId) { m_persistentId = persistentId; } 140 void setPersistentId(int64_t persistentId) { m_persistentId = persistentId; }
141 141
142 WebNotificationData m_data; 142 WebNotificationData m_data;
143 143
144 // ScriptValue representations of the developer-associated data. Initialized lazily on first access.
145 ScriptValue m_developerData;
146
147 // Notifications can either be bound to the page, which means they're identi fied by 144 // Notifications can either be bound to the page, which means they're identi fied by
148 // their delegate, or persistent, which means they're identified by a persis tent Id 145 // their delegate, or persistent, which means they're identified by a persis tent Id
149 // given to us by the embedder. This influences how we close the notificatio n. 146 // given to us by the embedder. This influences how we close the notificatio n.
150 int64_t m_persistentId; 147 int64_t m_persistentId;
151 148
152 enum NotificationState { 149 enum NotificationState {
153 NotificationStateIdle, 150 NotificationStateIdle,
154 NotificationStateShowing, 151 NotificationStateShowing,
155 NotificationStateClosing, 152 NotificationStateClosing,
156 NotificationStateClosed 153 NotificationStateClosed
157 }; 154 };
158 155
159 // Only to be used by the Notification::create() method when notifications w ere created 156 // Only to be used by the Notification::create() method when notifications w ere created
160 // by the embedder rather than by Blink. 157 // by the embedder rather than by Blink.
161 void setState(NotificationState state) { m_state = state; } 158 void setState(NotificationState state) { m_state = state; }
162 159
163 NotificationState m_state; 160 NotificationState m_state;
164 161
165 Member<AsyncMethodRunner<Notification>> m_prepareShowMethodRunner; 162 Member<AsyncMethodRunner<Notification>> m_prepareShowMethodRunner;
166 163
167 Member<NotificationResourcesLoader> m_loader; 164 Member<NotificationResourcesLoader> m_loader;
168 }; 165 };
169 166
170 } // namespace blink 167 } // namespace blink
171 168
172 #endif // Notification_h 169 #endif // Notification_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698