| 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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 m_state = NotificationStateShowing; | 166 m_state = NotificationStateShowing; |
| 167 } | 167 } |
| 168 | 168 |
| 169 void Notification::close() | 169 void Notification::close() |
| 170 { | 170 { |
| 171 if (m_state != NotificationStateShowing) | 171 if (m_state != NotificationStateShowing) |
| 172 return; | 172 return; |
| 173 | 173 |
| 174 if (m_persistentId == kInvalidPersistentId) { | 174 if (m_persistentId == kInvalidPersistentId) { |
| 175 // Fire the close event asynchronously. | 175 // Fire the close event asynchronously. |
| 176 getExecutionContext()->postTask(BLINK_FROM_HERE, createSameThreadTask(&N
otification::dispatchCloseEvent, this)); | 176 getExecutionContext()->postTask(BLINK_FROM_HERE, createSameThreadTask(&N
otification::dispatchCloseEvent, retainedRef(this))); |
| 177 | 177 |
| 178 m_state = NotificationStateClosing; | 178 m_state = NotificationStateClosing; |
| 179 notificationManager()->close(this); | 179 notificationManager()->close(this); |
| 180 } else { | 180 } else { |
| 181 m_state = NotificationStateClosed; | 181 m_state = NotificationStateClosed; |
| 182 | 182 |
| 183 SecurityOrigin* origin = getExecutionContext()->getSecurityOrigin(); | 183 SecurityOrigin* origin = getExecutionContext()->getSecurityOrigin(); |
| 184 ASSERT(origin); | 184 ASSERT(origin); |
| 185 | 185 |
| 186 notificationManager()->closePersistent(WebSecurityOrigin(origin), m_pers
istentId); | 186 notificationManager()->closePersistent(WebSecurityOrigin(origin), m_pers
istentId); |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 407 | 407 |
| 408 DEFINE_TRACE(Notification) | 408 DEFINE_TRACE(Notification) |
| 409 { | 409 { |
| 410 visitor->trace(m_prepareShowMethodRunner); | 410 visitor->trace(m_prepareShowMethodRunner); |
| 411 visitor->trace(m_loader); | 411 visitor->trace(m_loader); |
| 412 EventTargetWithInlineData::trace(visitor); | 412 EventTargetWithInlineData::trace(visitor); |
| 413 ActiveDOMObject::trace(visitor); | 413 ActiveDOMObject::trace(visitor); |
| 414 } | 414 } |
| 415 | 415 |
| 416 } // namespace blink | 416 } // namespace blink |
| OLD | NEW |