| 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 scriptURL.removeFragmentIdentifier(); | 349 scriptURL.removeFragmentIdentifier(); |
| 350 | 350 |
| 351 KURL patternURL; | 351 KURL patternURL; |
| 352 if (options.scope().isNull()) | 352 if (options.scope().isNull()) |
| 353 patternURL = KURL(scriptURL, "./"); | 353 patternURL = KURL(scriptURL, "./"); |
| 354 else | 354 else |
| 355 patternURL = enteredExecutionContext(scriptState->isolate()) | 355 patternURL = enteredExecutionContext(scriptState->isolate()) |
| 356 ->completeURL(options.scope()); | 356 ->completeURL(options.scope()); |
| 357 | 357 |
| 358 registerServiceWorkerImpl(executionContext, scriptURL, patternURL, | 358 registerServiceWorkerImpl(executionContext, scriptURL, patternURL, |
| 359 wrapUnique(new RegistrationCallback(resolver))); | 359 makeUnique<RegistrationCallback>(resolver)); |
| 360 | 360 |
| 361 return promise; | 361 return promise; |
| 362 } | 362 } |
| 363 | 363 |
| 364 ScriptPromise ServiceWorkerContainer::getRegistration( | 364 ScriptPromise ServiceWorkerContainer::getRegistration( |
| 365 ScriptState* scriptState, | 365 ScriptState* scriptState, |
| 366 const String& documentURL) { | 366 const String& documentURL) { |
| 367 ScriptPromiseResolver* resolver = ScriptPromiseResolver::create(scriptState); | 367 ScriptPromiseResolver* resolver = ScriptPromiseResolver::create(scriptState); |
| 368 ScriptPromise promise = resolver->promise(); | 368 ScriptPromise promise = resolver->promise(); |
| 369 | 369 |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 527 | 527 |
| 528 if (ServiceWorkerContainerClient* client = | 528 if (ServiceWorkerContainerClient* client = |
| 529 ServiceWorkerContainerClient::from(executionContext)) { | 529 ServiceWorkerContainerClient::from(executionContext)) { |
| 530 m_provider = client->provider(); | 530 m_provider = client->provider(); |
| 531 if (m_provider) | 531 if (m_provider) |
| 532 m_provider->setClient(this); | 532 m_provider->setClient(this); |
| 533 } | 533 } |
| 534 } | 534 } |
| 535 | 535 |
| 536 } // namespace blink | 536 } // namespace blink |
| OLD | NEW |