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

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

Issue 2300093002: Make //content responsible for generating notification Ids (Closed)
Patch Set: Make //content responsible for generating notification Ids Created 4 years, 3 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
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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 getExecutionContext()->postTask(BLINK_FROM_HERE, createSameThreadTask(&N otification::dispatchCloseEvent, wrapPersistent(this))); 177 getExecutionContext()->postTask(BLINK_FROM_HERE, createSameThreadTask(&N otification::dispatchCloseEvent, wrapPersistent(this)));
178 178
179 m_state = NotificationStateClosing; 179 m_state = NotificationStateClosing;
180 notificationManager()->close(this); 180 notificationManager()->close(this);
181 } else { 181 } else {
182 m_state = NotificationStateClosed; 182 m_state = NotificationStateClosed;
183 183
184 SecurityOrigin* origin = getExecutionContext()->getSecurityOrigin(); 184 SecurityOrigin* origin = getExecutionContext()->getSecurityOrigin();
185 DCHECK(origin); 185 DCHECK(origin);
186 186
187 notificationManager()->closePersistent(WebSecurityOrigin(origin), m_pers istentId); 187 notificationManager()->closePersistent(WebSecurityOrigin(origin), m_data .tag, m_persistentId);
188 } 188 }
189 } 189 }
190 190
191 void Notification::dispatchShowEvent() 191 void Notification::dispatchShowEvent()
192 { 192 {
193 dispatchEvent(Event::create(EventTypeNames::show)); 193 dispatchEvent(Event::create(EventTypeNames::show));
194 } 194 }
195 195
196 void Notification::dispatchClickEvent() 196 void Notification::dispatchClickEvent()
197 { 197 {
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 394
395 DEFINE_TRACE(Notification) 395 DEFINE_TRACE(Notification)
396 { 396 {
397 visitor->trace(m_prepareShowMethodRunner); 397 visitor->trace(m_prepareShowMethodRunner);
398 visitor->trace(m_loader); 398 visitor->trace(m_loader);
399 EventTargetWithInlineData::trace(visitor); 399 EventTargetWithInlineData::trace(visitor);
400 ActiveDOMObject::trace(visitor); 400 ActiveDOMObject::trace(visitor);
401 } 401 }
402 402
403 } // namespace blink 403 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698