| 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 const AtomicString& interfaceName() const override; | 107 const AtomicString& interfaceName() const override; |
| 108 | 108 |
| 109 // ActiveDOMObject interface. | 109 // ActiveDOMObject interface. |
| 110 void stop() override; | 110 void stop() override; |
| 111 bool hasPendingActivity() const override; | 111 bool hasPendingActivity() const override; |
| 112 | 112 |
| 113 DECLARE_VIRTUAL_TRACE(); | 113 DECLARE_VIRTUAL_TRACE(); |
| 114 | 114 |
| 115 protected: | 115 protected: |
| 116 // EventTarget interface. | 116 // EventTarget interface. |
| 117 bool dispatchEventInternal(PassRefPtrWillBeRawPtr<Event>) final; | 117 WebInputEventResult dispatchEventInternal(PassRefPtrWillBeRawPtr<Event>) fin
al; |
| 118 | 118 |
| 119 private: | 119 private: |
| 120 Notification(ExecutionContext*, const WebNotificationData&); | 120 Notification(ExecutionContext*, const WebNotificationData&); |
| 121 | 121 |
| 122 void scheduleShow(); | 122 void scheduleShow(); |
| 123 | 123 |
| 124 // Calling show() may start asynchronous operation. If this object has | 124 // Calling show() may start asynchronous operation. If this object has |
| 125 // a V8 wrapper, hasPendingActivity() prevents the wrapper from being | 125 // a V8 wrapper, hasPendingActivity() prevents the wrapper from being |
| 126 // collected while m_state is Showing, and so this instance stays alive | 126 // collected while m_state is Showing, and so this instance stays alive |
| 127 // until the operation completes. Otherwise, you need to hold a ref on this | 127 // until the operation completes. Otherwise, you need to hold a ref on this |
| (...skipping 24 matching lines...) Expand all Loading... |
| 152 void setState(NotificationState state) { m_state = state; } | 152 void setState(NotificationState state) { m_state = state; } |
| 153 | 153 |
| 154 NotificationState m_state; | 154 NotificationState m_state; |
| 155 | 155 |
| 156 AsyncMethodRunner<Notification> m_asyncRunner; | 156 AsyncMethodRunner<Notification> m_asyncRunner; |
| 157 }; | 157 }; |
| 158 | 158 |
| 159 } // namespace blink | 159 } // namespace blink |
| 160 | 160 |
| 161 #endif // Notification_h | 161 #endif // Notification_h |
| OLD | NEW |