| 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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 | 201 |
| 202 notificationManager()->closePersistent(WebSecurityOrigin(origin), m_data.tag, | 202 notificationManager()->closePersistent(WebSecurityOrigin(origin), m_data.tag, |
| 203 m_notificationId); | 203 m_notificationId); |
| 204 } | 204 } |
| 205 | 205 |
| 206 void Notification::dispatchShowEvent() { | 206 void Notification::dispatchShowEvent() { |
| 207 dispatchEvent(Event::create(EventTypeNames::show)); | 207 dispatchEvent(Event::create(EventTypeNames::show)); |
| 208 } | 208 } |
| 209 | 209 |
| 210 void Notification::dispatchClickEvent() { | 210 void Notification::dispatchClickEvent() { |
| 211 UserGestureIndicator gestureIndicator(DefinitelyProcessingNewUserGesture); | 211 UserGestureIndicator gestureIndicator( |
| 212 UserGestureToken::create(UserGestureToken::NewGesture)); |
| 212 ScopedWindowFocusAllowedIndicator windowFocusAllowed(getExecutionContext()); | 213 ScopedWindowFocusAllowedIndicator windowFocusAllowed(getExecutionContext()); |
| 213 dispatchEvent(Event::create(EventTypeNames::click)); | 214 dispatchEvent(Event::create(EventTypeNames::click)); |
| 214 } | 215 } |
| 215 | 216 |
| 216 void Notification::dispatchErrorEvent() { | 217 void Notification::dispatchErrorEvent() { |
| 217 dispatchEvent(Event::create(EventTypeNames::error)); | 218 dispatchEvent(Event::create(EventTypeNames::error)); |
| 218 } | 219 } |
| 219 | 220 |
| 220 void Notification::dispatchCloseEvent() { | 221 void Notification::dispatchCloseEvent() { |
| 221 // The notification should be Showing if the user initiated the close, or it | 222 // The notification should be Showing if the user initiated the close, or it |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 } | 397 } |
| 397 | 398 |
| 398 DEFINE_TRACE(Notification) { | 399 DEFINE_TRACE(Notification) { |
| 399 visitor->trace(m_prepareShowMethodRunner); | 400 visitor->trace(m_prepareShowMethodRunner); |
| 400 visitor->trace(m_loader); | 401 visitor->trace(m_loader); |
| 401 EventTargetWithInlineData::trace(visitor); | 402 EventTargetWithInlineData::trace(visitor); |
| 402 ActiveDOMObject::trace(visitor); | 403 ActiveDOMObject::trace(visitor); |
| 403 } | 404 } |
| 404 | 405 |
| 405 } // namespace blink | 406 } // namespace blink |
| OLD | NEW |