| 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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 { | 109 { |
| 110 Notification* notification = new Notification(context, data); | 110 Notification* notification = new Notification(context, data); |
| 111 notification->setPersistentId(persistentId); | 111 notification->setPersistentId(persistentId); |
| 112 notification->setState(showing ? NotificationStateShowing : NotificationStat
eClosed); | 112 notification->setState(showing ? NotificationStateShowing : NotificationStat
eClosed); |
| 113 notification->suspendIfNeeded(); | 113 notification->suspendIfNeeded(); |
| 114 | 114 |
| 115 return notification; | 115 return notification; |
| 116 } | 116 } |
| 117 | 117 |
| 118 Notification::Notification(ExecutionContext* context, const WebNotificationData&
data) | 118 Notification::Notification(ExecutionContext* context, const WebNotificationData&
data) |
| 119 : ActiveDOMObject(context) | 119 : ActiveScriptWrappable(this) |
| 120 , ActiveDOMObject(context) |
| 120 , m_data(data) | 121 , m_data(data) |
| 121 , m_persistentId(kInvalidPersistentId) | 122 , m_persistentId(kInvalidPersistentId) |
| 122 , m_state(NotificationStateIdle) | 123 , m_state(NotificationStateIdle) |
| 123 , m_asyncRunner(AsyncMethodRunner<Notification>::create(this, &Notification:
:show)) | 124 , m_asyncRunner(AsyncMethodRunner<Notification>::create(this, &Notification:
:show)) |
| 124 { | 125 { |
| 125 ASSERT(notificationManager()); | 126 ASSERT(notificationManager()); |
| 126 } | 127 } |
| 127 | 128 |
| 128 Notification::~Notification() | 129 Notification::~Notification() |
| 129 { | 130 { |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 } | 384 } |
| 384 | 385 |
| 385 DEFINE_TRACE(Notification) | 386 DEFINE_TRACE(Notification) |
| 386 { | 387 { |
| 387 visitor->trace(m_asyncRunner); | 388 visitor->trace(m_asyncRunner); |
| 388 RefCountedGarbageCollectedEventTargetWithInlineData<Notification>::trace(vis
itor); | 389 RefCountedGarbageCollectedEventTargetWithInlineData<Notification>::trace(vis
itor); |
| 389 ActiveDOMObject::trace(visitor); | 390 ActiveDOMObject::trace(visitor); |
| 390 } | 391 } |
| 391 | 392 |
| 392 } // namespace blink | 393 } // namespace blink |
| OLD | NEW |