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

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

Issue 2701993002: DO NOT COMMIT: Results of running new (proposed) clang-format on Blink (Closed)
Patch Set: Created 3 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
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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 } 180 }
181 181
182 void Notification::close() { 182 void Notification::close() {
183 if (m_state != State::Showing) 183 if (m_state != State::Showing)
184 return; 184 return;
185 185
186 // Schedule the "close" event to be fired for non-persistent notifications. 186 // Schedule the "close" event to be fired for non-persistent notifications.
187 // Persistent notifications won't get such events for programmatic closes. 187 // Persistent notifications won't get such events for programmatic closes.
188 if (m_type == Type::NonPersistent) { 188 if (m_type == Type::NonPersistent) {
189 TaskRunnerHelper::get(TaskType::UserInteraction, getExecutionContext()) 189 TaskRunnerHelper::get(TaskType::UserInteraction, getExecutionContext())
190 ->postTask(BLINK_FROM_HERE, WTF::bind(&Notification::dispatchCloseEvent, 190 ->postTask(
191 wrapPersistent(this))); 191 BLINK_FROM_HERE,
192 WTF::bind(&Notification::dispatchCloseEvent, wrapPersistent(this)));
192 m_state = State::Closing; 193 m_state = State::Closing;
193 194
194 notificationManager()->close(this); 195 notificationManager()->close(this);
195 return; 196 return;
196 } 197 }
197 198
198 m_state = State::Closed; 199 m_state = State::Closed;
199 200
200 SecurityOrigin* origin = getExecutionContext()->getSecurityOrigin(); 201 SecurityOrigin* origin = getExecutionContext()->getSecurityOrigin();
201 DCHECK(origin); 202 DCHECK(origin);
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 } 423 }
423 424
424 DEFINE_TRACE(Notification) { 425 DEFINE_TRACE(Notification) {
425 visitor->trace(m_prepareShowMethodRunner); 426 visitor->trace(m_prepareShowMethodRunner);
426 visitor->trace(m_loader); 427 visitor->trace(m_loader);
427 EventTargetWithInlineData::trace(visitor); 428 EventTargetWithInlineData::trace(visitor);
428 ContextLifecycleObserver::trace(visitor); 429 ContextLifecycleObserver::trace(visitor);
429 } 430 }
430 431
431 } // namespace blink 432 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/nfc/NFC.cpp ('k') | third_party/WebKit/Source/modules/payments/PaymentAppManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698