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

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

Issue 2700293002: DevTools: do not use RAII for sync native breakpoints, reuse AsyncTask where possible. (Closed)
Patch Set: same with unused assert removed - assert is trivial 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
« no previous file with comments | « third_party/WebKit/Source/modules/geolocation/Geolocation.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 UseCounter::NotificationPermissionRequestedIframe); 373 UseCounter::NotificationPermissionRequestedIframe);
374 } 374 }
375 } 375 }
376 376
377 if (!UserGestureIndicator::processingUserGesture()) { 377 if (!UserGestureIndicator::processingUserGesture()) {
378 PerformanceMonitor::reportGenericViolation( 378 PerformanceMonitor::reportGenericViolation(
379 context, PerformanceMonitor::kDiscouragedAPIUse, 379 context, PerformanceMonitor::kDiscouragedAPIUse,
380 "Only request notification permission in response to a user gesture.", 380 "Only request notification permission in response to a user gesture.",
381 0, nullptr); 381 0, nullptr);
382 } 382 }
383 InspectorInstrumentation::NativeBreakpoint nativeBreakpoint( 383 InspectorInstrumentation::breakIfNeeded(context,
384 context, "Notification.requestPermission", true); 384 "Notification.requestPermission");
385 385
386 return NotificationManager::from(context)->requestPermission( 386 return NotificationManager::from(context)->requestPermission(
387 scriptState, deprecatedCallback); 387 scriptState, deprecatedCallback);
388 } 388 }
389 389
390 size_t Notification::maxActions() { 390 size_t Notification::maxActions() {
391 return kWebNotificationMaxActions; 391 return kWebNotificationMaxActions;
392 } 392 }
393 393
394 DispatchEventResult Notification::dispatchEventInternal(Event* event) { 394 DispatchEventResult Notification::dispatchEventInternal(Event* event) {
(...skipping 27 matching lines...) Expand all
422 } 422 }
423 423
424 DEFINE_TRACE(Notification) { 424 DEFINE_TRACE(Notification) {
425 visitor->trace(m_prepareShowMethodRunner); 425 visitor->trace(m_prepareShowMethodRunner);
426 visitor->trace(m_loader); 426 visitor->trace(m_loader);
427 EventTargetWithInlineData::trace(visitor); 427 EventTargetWithInlineData::trace(visitor);
428 ContextLifecycleObserver::trace(visitor); 428 ContextLifecycleObserver::trace(visitor);
429 } 429 }
430 430
431 } // namespace blink 431 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/geolocation/Geolocation.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698