Chromium Code Reviews| Index: Source/modules/notifications/Notification.cpp |
| diff --git a/Source/modules/notifications/Notification.cpp b/Source/modules/notifications/Notification.cpp |
| index abee7083931c897faebff4bc7d3bdbd4f93775b7..bfeb9c434d8c7c46d987cc00fb011fbe8361d98a 100644 |
| --- a/Source/modules/notifications/Notification.cpp |
| +++ b/Source/modules/notifications/Notification.cpp |
| @@ -1,3 +1,4 @@ |
| + |
|
abarth-chromium
2013/10/22 18:46:51
supurious?
tyoshino (SeeGerritForStatus)
2013/10/23 06:02:30
oh, mistake. removed
|
| /* |
| * Copyright (C) 2009 Google Inc. All rights reserved. |
| * Copyright (C) 2009, 2011, 2012 Apple Inc. All rights reserved. |
| @@ -87,14 +88,14 @@ Notification::Notification(ExecutionContext* context, const String& title) |
| : ActiveDOMObject(context) |
| , m_title(title) |
| , m_state(Idle) |
| - , m_taskTimer(adoptPtr(new Timer<Notification>(this, &Notification::taskTimerFired))) |
| + , m_asyncRunner(adoptPtr(new AsyncMethodRunner<Notification>(this, &Notification::showSoon))) |
| { |
| ScriptWrappable::init(this); |
| m_notificationClient = NotificationController::clientFrom(toDocument(context)->page()); |
| ASSERT(m_notificationClient); |
| - m_taskTimer->startOneShot(0); |
| + m_asyncRunner->runAsync(); |
| } |
| Notification::~Notification() |
| @@ -207,10 +208,9 @@ void Notification::dispatchErrorEvent() |
| dispatchEvent(Event::create(EventTypeNames::error)); |
| } |
| -void Notification::taskTimerFired(Timer<Notification>* timer) |
| +void Notification::showSoon() |
| { |
| ASSERT(executionContext()->isDocument()); |
| - ASSERT_UNUSED(timer, timer == m_taskTimer.get()); |
| show(); |
| } |