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

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

Issue 2733093003: DevTools: instrument user callbacks based on generic probes, remove NativeBreakpoint. (Closed)
Patch Set: test fixed Created 3 years, 9 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 probe::breakIfNeeded(context, "Notification.requestPermission"); 383 probe::breakableLocation(context, "Notification.requestPermission");
384 384
385 return NotificationManager::from(context)->requestPermission( 385 return NotificationManager::from(context)->requestPermission(
386 scriptState, deprecatedCallback); 386 scriptState, deprecatedCallback);
387 } 387 }
388 388
389 size_t Notification::maxActions() { 389 size_t Notification::maxActions() {
390 return kWebNotificationMaxActions; 390 return kWebNotificationMaxActions;
391 } 391 }
392 392
393 DispatchEventResult Notification::dispatchEventInternal(Event* event) { 393 DispatchEventResult Notification::dispatchEventInternal(Event* event) {
(...skipping 27 matching lines...) Expand all
421 } 421 }
422 422
423 DEFINE_TRACE(Notification) { 423 DEFINE_TRACE(Notification) {
424 visitor->trace(m_prepareShowMethodRunner); 424 visitor->trace(m_prepareShowMethodRunner);
425 visitor->trace(m_loader); 425 visitor->trace(m_loader);
426 EventTargetWithInlineData::trace(visitor); 426 EventTargetWithInlineData::trace(visitor);
427 ContextLifecycleObserver::trace(visitor); 427 ContextLifecycleObserver::trace(visitor);
428 } 428 }
429 429
430 } // namespace blink 430 } // 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