Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(122)

Side by Side Diff: Source/modules/notifications/Notification.cpp

Issue 915703002: Add task location information to ExecutionContext (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased. Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 m_state = NotificationStateShowing; 153 m_state = NotificationStateShowing;
154 } 154 }
155 155
156 void Notification::close() 156 void Notification::close()
157 { 157 {
158 if (m_state != NotificationStateShowing) 158 if (m_state != NotificationStateShowing)
159 return; 159 return;
160 160
161 if (m_persistentId.isEmpty()) { 161 if (m_persistentId.isEmpty()) {
162 // Fire the close event asynchronously. 162 // Fire the close event asynchronously.
163 executionContext()->postTask(createSameThreadTask(&Notification::dispatc hCloseEvent, this)); 163 executionContext()->postTask(FROM_HERE, createSameThreadTask(&Notificati on::dispatchCloseEvent, this));
164 164
165 m_state = NotificationStateClosing; 165 m_state = NotificationStateClosing;
166 notificationManager()->close(this); 166 notificationManager()->close(this);
167 } else { 167 } else {
168 m_state = NotificationStateClosed; 168 m_state = NotificationStateClosed;
169 notificationManager()->closePersistent(m_persistentId); 169 notificationManager()->closePersistent(m_persistentId);
170 } 170 }
171 } 171 }
172 172
173 void Notification::dispatchShowEvent() 173 void Notification::dispatchShowEvent()
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 return m_state == NotificationStateShowing || m_asyncRunner.isActive(); 265 return m_state == NotificationStateShowing || m_asyncRunner.isActive();
266 } 266 }
267 267
268 DEFINE_TRACE(Notification) 268 DEFINE_TRACE(Notification)
269 { 269 {
270 RefCountedGarbageCollectedEventTargetWithInlineData<Notification>::trace(vis itor); 270 RefCountedGarbageCollectedEventTargetWithInlineData<Notification>::trace(vis itor);
271 ActiveDOMObject::trace(visitor); 271 ActiveDOMObject::trace(visitor);
272 } 272 }
273 273
274 } // namespace blink 274 } // namespace blink
OLDNEW
« no previous file with comments | « Source/modules/mediastream/MediaStreamTrackSourcesRequestImpl.cpp ('k') | Source/modules/quota/DeprecatedStorageInfo.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698