| 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 WebString messageString = message->toWireString(); | 94 WebString messageString = message->toWireString(); |
| 95 OwnPtr<WebMessagePortChannelArray> webChannels = MessagePort::toWebMessagePo
rtChannelArray(channels.release()); | 95 OwnPtr<WebMessagePortChannelArray> webChannels = MessagePort::toWebMessagePo
rtChannelArray(channels.release()); |
| 96 m_outerWorker->postMessage(messageString, webChannels.leakPtr()); | 96 m_outerWorker->postMessage(messageString, webChannels.leakPtr()); |
| 97 } | 97 } |
| 98 | 98 |
| 99 void ServiceWorker::terminate(ExceptionState& exceptionState) | 99 void ServiceWorker::terminate(ExceptionState& exceptionState) |
| 100 { | 100 { |
| 101 exceptionState.throwDOMException(InvalidAccessError, "Not supported."); | 101 exceptionState.throwDOMException(InvalidAccessError, "Not supported."); |
| 102 } | 102 } |
| 103 | 103 |
| 104 void ServiceWorker::internalsTerminate() |
| 105 { |
| 106 m_outerWorker->terminate(); |
| 107 } |
| 108 |
| 104 bool ServiceWorker::isReady() | 109 bool ServiceWorker::isReady() |
| 105 { | 110 { |
| 106 return m_proxyState == Ready; | 111 return m_proxyState == Ready; |
| 107 } | 112 } |
| 108 | 113 |
| 109 void ServiceWorker::dispatchStateChangeEvent() | 114 void ServiceWorker::dispatchStateChangeEvent() |
| 110 { | 115 { |
| 111 ASSERT(isReady()); | 116 ASSERT(isReady()); |
| 112 this->dispatchEvent(Event::create(EventTypeNames::statechange)); | 117 this->dispatchEvent(Event::create(EventTypeNames::statechange)); |
| 113 } | 118 } |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 ServiceWorker::ServiceWorker(ExecutionContext* executionContext, PassOwnPtr<WebS
erviceWorker> worker) | 258 ServiceWorker::ServiceWorker(ExecutionContext* executionContext, PassOwnPtr<WebS
erviceWorker> worker) |
| 254 : AbstractWorker(executionContext) | 259 : AbstractWorker(executionContext) |
| 255 , m_outerWorker(worker) | 260 , m_outerWorker(worker) |
| 256 , m_proxyState(Initial) | 261 , m_proxyState(Initial) |
| 257 { | 262 { |
| 258 ASSERT(m_outerWorker); | 263 ASSERT(m_outerWorker); |
| 259 m_outerWorker->setProxy(this); | 264 m_outerWorker->setProxy(this); |
| 260 } | 265 } |
| 261 | 266 |
| 262 } // namespace blink | 267 } // namespace blink |
| OLD | NEW |