OLD | NEW |
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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 notification->setState(showing ? State::Showing : State::Closed); | 126 notification->setState(showing ? State::Showing : State::Closed); |
127 notification->setNotificationId(notificationId); | 127 notification->setNotificationId(notificationId); |
128 | 128 |
129 notification->suspendIfNeeded(); | 129 notification->suspendIfNeeded(); |
130 return notification; | 130 return notification; |
131 } | 131 } |
132 | 132 |
133 Notification::Notification(ExecutionContext* context, | 133 Notification::Notification(ExecutionContext* context, |
134 Type type, | 134 Type type, |
135 const WebNotificationData& data) | 135 const WebNotificationData& data) |
136 : ActiveScriptWrappable(this), | 136 : ActiveScriptWrappable<Notification>(this), |
137 SuspendableObject(context), | 137 SuspendableObject(context), |
138 m_type(type), | 138 m_type(type), |
139 m_state(State::Loading), | 139 m_state(State::Loading), |
140 m_data(data) { | 140 m_data(data) { |
141 DCHECK(notificationManager()); | 141 DCHECK(notificationManager()); |
142 } | 142 } |
143 | 143 |
144 Notification::~Notification() {} | 144 Notification::~Notification() {} |
145 | 145 |
146 void Notification::schedulePrepareShow() { | 146 void Notification::schedulePrepareShow() { |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
400 } | 400 } |
401 | 401 |
402 DEFINE_TRACE(Notification) { | 402 DEFINE_TRACE(Notification) { |
403 visitor->trace(m_prepareShowMethodRunner); | 403 visitor->trace(m_prepareShowMethodRunner); |
404 visitor->trace(m_loader); | 404 visitor->trace(m_loader); |
405 EventTargetWithInlineData::trace(visitor); | 405 EventTargetWithInlineData::trace(visitor); |
406 SuspendableObject::trace(visitor); | 406 SuspendableObject::trace(visitor); |
407 } | 407 } |
408 | 408 |
409 } // namespace blink | 409 } // namespace blink |
OLD | NEW |