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

Side by Side Diff: third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp

Issue 2535093003: Worker: Connect UseCounter to workers and worklets (Closed)
Patch Set: Created 4 years 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 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 Event* event = SyncEvent::create(EventTypeNames::sync, tag, 326 Event* event = SyncEvent::create(EventTypeNames::sync, tag,
327 lastChance == IsLastChance, observer); 327 lastChance == IsLastChance, observer);
328 workerGlobalScope()->dispatchExtendableEvent(event, observer); 328 workerGlobalScope()->dispatchExtendableEvent(event, observer);
329 } 329 }
330 330
331 bool ServiceWorkerGlobalScopeProxy::hasFetchEventHandler() { 331 bool ServiceWorkerGlobalScopeProxy::hasFetchEventHandler() {
332 DCHECK(m_workerGlobalScope); 332 DCHECK(m_workerGlobalScope);
333 return m_workerGlobalScope->hasEventListeners(EventTypeNames::fetch); 333 return m_workerGlobalScope->hasEventListeners(EventTypeNames::fetch);
334 } 334 }
335 335
336 void ServiceWorkerGlobalScopeProxy::countFeature(UseCounter::Feature) {
337 // TODO(nhiroki): Support UseCounter for ServiceWorker.
338 // (https://crbug.com/376039)
falken 2016/12/02 08:54:49 NOTIMPLEMENTED?
nhiroki 2016/12/05 04:49:01 This is reachable.
339 }
340
341 void ServiceWorkerGlobalScopeProxy::countDeprecation(UseCounter::Feature) {
342 // TODO(nhiroki): Support UseCounter for ServiceWorker.
343 // (https://crbug.com/376039)
344 }
345
336 void ServiceWorkerGlobalScopeProxy::reportException( 346 void ServiceWorkerGlobalScopeProxy::reportException(
337 const String& errorMessage, 347 const String& errorMessage,
338 std::unique_ptr<SourceLocation> location, 348 std::unique_ptr<SourceLocation> location,
339 int exceptionId) { 349 int exceptionId) {
340 client().reportException(errorMessage, location->lineNumber(), 350 client().reportException(errorMessage, location->lineNumber(),
341 location->columnNumber(), location->url()); 351 location->columnNumber(), location->url());
342 } 352 }
343 353
344 void ServiceWorkerGlobalScopeProxy::reportConsoleMessage( 354 void ServiceWorkerGlobalScopeProxy::reportConsoleMessage(
345 MessageSource source, 355 MessageSource source,
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 return *m_document; 460 return *m_document;
451 } 461 }
452 462
453 ServiceWorkerGlobalScope* ServiceWorkerGlobalScopeProxy::workerGlobalScope() 463 ServiceWorkerGlobalScope* ServiceWorkerGlobalScopeProxy::workerGlobalScope()
454 const { 464 const {
455 DCHECK(m_workerGlobalScope); 465 DCHECK(m_workerGlobalScope);
456 return m_workerGlobalScope; 466 return m_workerGlobalScope;
457 } 467 }
458 468
459 } // namespace blink 469 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698