Chromium Code Reviews| Index: Source/web/WebNotification.cpp |
| diff --git a/Source/web/WebNotification.cpp b/Source/web/WebNotification.cpp |
| index bc0f462f4f0d272bae2d91d1a7fe7371c341b6bc..ab79a0361724f61b2df4b5a748b5c0b22645e9ce 100644 |
| --- a/Source/web/WebNotification.cpp |
| +++ b/Source/web/WebNotification.cpp |
| @@ -111,39 +111,24 @@ void WebNotification::detachPresenter() |
| void WebNotification::dispatchDisplayEvent() |
| { |
| -#if ENABLE(LEGACY_NOTIFICATIONS) |
| - dispatchEvent("display"); |
| -#endif |
| - dispatchEvent("show"); |
| + m_private->dispatchShowEvent(); |
|
haraken
2013/08/16 14:58:03
Don't you need to check m_private->scriptExecution
kouhei (in TOK)
2013/08/20 00:58:56
True, but I don't understand why it is needed. It
haraken
2013/08/20 02:50:21
The check is needed because it's possible that not
kouhei (in TOK)
2013/08/22 03:18:47
I'll keep this check in this CL, and will do a sep
|
| } |
| void WebNotification::dispatchErrorEvent(const WebKit::WebString& /* errorMessage */) |
| { |
| // FIXME: errorMessage not supported by WebCore yet |
| - dispatchEvent(eventNames().errorEvent); |
| + m_private->dispatchErrorEvent(); |
| } |
| void WebNotification::dispatchCloseEvent(bool /* byUser */) |
| { |
| // FIXME: byUser flag not supported by WebCore yet |
| - dispatchEvent(eventNames().closeEvent); |
| + m_private->dispatchCloseEvent(); |
| } |
| void WebNotification::dispatchClickEvent() |
| { |
| - UserGestureIndicator gestureIndicator(DefinitelyProcessingNewUserGesture); |
| - WindowFocusAllowedIndicator windowFocusAllowed; |
| - dispatchEvent(eventNames().clickEvent); |
| -} |
| - |
| -void WebNotification::dispatchEvent(const WTF::AtomicString& type) |
| -{ |
| - // Do not dispatch if the context is gone. |
| - if (!m_private->scriptExecutionContext()) |
| - return; |
| - |
| - RefPtr<Event> event = Event::create(type, false, true); |
| - m_private->dispatchEvent(event.release()); |
| + m_private->dispatchClickEvent(); |
| } |
| WebNotification::WebNotification(const WTF::PassRefPtr<Notification>& notification) |