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