| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2009, 2011, 2012 Apple Inc. All rights reserved. | 3 * Copyright (C) 2009, 2011, 2012 Apple Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 case Idle: | 160 case Idle: |
| 161 break; | 161 break; |
| 162 case Showing: | 162 case Showing: |
| 163 m_notificationClient->cancel(this); | 163 m_notificationClient->cancel(this); |
| 164 break; | 164 break; |
| 165 case Closed: | 165 case Closed: |
| 166 break; | 166 break; |
| 167 } | 167 } |
| 168 } | 168 } |
| 169 | 169 |
| 170 EventTargetData* Notification::eventTargetData() | |
| 171 { | |
| 172 return &m_eventTargetData; | |
| 173 } | |
| 174 | |
| 175 EventTargetData* Notification::ensureEventTargetData() | |
| 176 { | |
| 177 return &m_eventTargetData; | |
| 178 } | |
| 179 | |
| 180 void Notification::contextDestroyed() | 170 void Notification::contextDestroyed() |
| 181 { | 171 { |
| 182 ActiveDOMObject::contextDestroyed(); | 172 ActiveDOMObject::contextDestroyed(); |
| 183 m_notificationClient->notificationObjectDestroyed(this); | 173 m_notificationClient->notificationObjectDestroyed(this); |
| 184 } | 174 } |
| 185 | 175 |
| 186 void Notification::finalize() | 176 void Notification::finalize() |
| 187 { | 177 { |
| 188 if (m_state == Closed) | 178 if (m_state == Closed) |
| 189 return; | 179 return; |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 return deniedPermission; | 248 return deniedPermission; |
| 259 } | 249 } |
| 260 | 250 |
| 261 void Notification::requestPermission(ScriptExecutionContext* context, PassRefPtr
<NotificationPermissionCallback> callback) | 251 void Notification::requestPermission(ScriptExecutionContext* context, PassRefPtr
<NotificationPermissionCallback> callback) |
| 262 { | 252 { |
| 263 ASSERT(toDocument(context)->page()); | 253 ASSERT(toDocument(context)->page()); |
| 264 NotificationController::from(toDocument(context)->page())->client()->request
Permission(context, callback); | 254 NotificationController::from(toDocument(context)->page())->client()->request
Permission(context, callback); |
| 265 } | 255 } |
| 266 | 256 |
| 267 } // namespace WebCore | 257 } // namespace WebCore |
| OLD | NEW |