OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 } | 128 } |
129 | 129 |
130 void WebNotification::dispatchCloseEvent(bool /* byUser */) | 130 void WebNotification::dispatchCloseEvent(bool /* byUser */) |
131 { | 131 { |
132 // FIXME: byUser flag not supported by WebCore yet | 132 // FIXME: byUser flag not supported by WebCore yet |
133 dispatchEvent(eventNames().closeEvent); | 133 dispatchEvent(eventNames().closeEvent); |
134 } | 134 } |
135 | 135 |
136 void WebNotification::dispatchClickEvent() | 136 void WebNotification::dispatchClickEvent() |
137 { | 137 { |
138 UserGestureIndicator gestureIndicator(DefinitelyProcessingUserGesture); | 138 UserGestureIndicator gestureIndicator(DefinitelyProcessingNewUserGesture); |
139 WindowFocusAllowedIndicator windowFocusAllowed; | 139 WindowFocusAllowedIndicator windowFocusAllowed; |
140 dispatchEvent(eventNames().clickEvent); | 140 dispatchEvent(eventNames().clickEvent); |
141 } | 141 } |
142 | 142 |
143 void WebNotification::dispatchEvent(const WTF::AtomicString& type) | 143 void WebNotification::dispatchEvent(const WTF::AtomicString& type) |
144 { | 144 { |
145 // Do not dispatch if the context is gone. | 145 // Do not dispatch if the context is gone. |
146 if (!m_private->scriptExecutionContext()) | 146 if (!m_private->scriptExecutionContext()) |
147 return; | 147 return; |
148 | 148 |
(...skipping 21 matching lines...) Expand all Loading... |
170 { | 170 { |
171 // p is already ref'd for us by the caller | 171 // p is already ref'd for us by the caller |
172 if (m_private) | 172 if (m_private) |
173 m_private->deref(); | 173 m_private->deref(); |
174 m_private = p; | 174 m_private = p; |
175 } | 175 } |
176 | 176 |
177 } // namespace WebKit | 177 } // namespace WebKit |
178 | 178 |
179 #endif // ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS) | 179 #endif // ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS) |
OLD | NEW |