| OLD | NEW |
| 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 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 349 webAppRequest), | 349 webAppRequest), |
| 350 observer); | 350 observer); |
| 351 workerGlobalScope()->dispatchExtendableEvent(event, observer); | 351 workerGlobalScope()->dispatchExtendableEvent(event, observer); |
| 352 } | 352 } |
| 353 | 353 |
| 354 bool ServiceWorkerGlobalScopeProxy::hasFetchEventHandler() { | 354 bool ServiceWorkerGlobalScopeProxy::hasFetchEventHandler() { |
| 355 DCHECK(m_workerGlobalScope); | 355 DCHECK(m_workerGlobalScope); |
| 356 return m_workerGlobalScope->hasEventListeners(EventTypeNames::fetch); | 356 return m_workerGlobalScope->hasEventListeners(EventTypeNames::fetch); |
| 357 } | 357 } |
| 358 | 358 |
| 359 void ServiceWorkerGlobalScopeProxy::countFeature(UseCounter::Feature) { | 359 void ServiceWorkerGlobalScopeProxy::countFeature(UseCounter::Feature feature) { |
| 360 // TODO(nhiroki): Support UseCounter for ServiceWorker. Send an IPC message to | 360 client().countFeature(static_cast<uint32_t>(feature)); |
| 361 // the browser process and ask each controlled document to record API use in | |
| 362 // its UseCoutner (https://crbug.com/376039). | |
| 363 } | 361 } |
| 364 | 362 |
| 365 void ServiceWorkerGlobalScopeProxy::countDeprecation(UseCounter::Feature) { | 363 void ServiceWorkerGlobalScopeProxy::countDeprecation( |
| 366 // TODO(nhiroki): Support UseCounter for ServiceWorker. Send an IPC message to | 364 UseCounter::Feature feature) { |
| 367 // the browser process and ask each controlled document to record API use in | 365 // Go through the same code path with countFeature() because a deprecation |
| 368 // its UseCoutner (https://crbug.com/376039). | 366 // message is already shown on the worker console and a remaining work is just |
| 367 // to record an API use. |
| 368 countFeature(feature); |
| 369 } | 369 } |
| 370 | 370 |
| 371 void ServiceWorkerGlobalScopeProxy::reportException( | 371 void ServiceWorkerGlobalScopeProxy::reportException( |
| 372 const String& errorMessage, | 372 const String& errorMessage, |
| 373 std::unique_ptr<SourceLocation> location, | 373 std::unique_ptr<SourceLocation> location, |
| 374 int exceptionId) { | 374 int exceptionId) { |
| 375 client().reportException(errorMessage, location->lineNumber(), | 375 client().reportException(errorMessage, location->lineNumber(), |
| 376 location->columnNumber(), location->url()); | 376 location->columnNumber(), location->url()); |
| 377 } | 377 } |
| 378 | 378 |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 483 return *m_document; | 483 return *m_document; |
| 484 } | 484 } |
| 485 | 485 |
| 486 ServiceWorkerGlobalScope* ServiceWorkerGlobalScopeProxy::workerGlobalScope() | 486 ServiceWorkerGlobalScope* ServiceWorkerGlobalScopeProxy::workerGlobalScope() |
| 487 const { | 487 const { |
| 488 DCHECK(m_workerGlobalScope); | 488 DCHECK(m_workerGlobalScope); |
| 489 return m_workerGlobalScope; | 489 return m_workerGlobalScope; |
| 490 } | 490 } |
| 491 | 491 |
| 492 } // namespace blink | 492 } // namespace blink |
| OLD | NEW |