| 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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 { | 165 { |
| 166 ASSERT(m_workerGlobalScope); | 166 ASSERT(m_workerGlobalScope); |
| 167 OwnPtrWillBeRawPtr<MessagePortArray> ports = MessagePort::toMessagePortArray
(m_workerGlobalScope, webChannels); | 167 OwnPtrWillBeRawPtr<MessagePortArray> ports = MessagePort::toMessagePortArray
(m_workerGlobalScope, webChannels); |
| 168 WebSerializedScriptValue value = WebSerializedScriptValue::fromString(messag
e); | 168 WebSerializedScriptValue value = WebSerializedScriptValue::fromString(messag
e); |
| 169 // FIXME: Have proper source for this MessageEvent. | 169 // FIXME: Have proper source for this MessageEvent. |
| 170 RefPtrWillBeRawPtr<MessageEvent> event = MessageEvent::create(ports.release(
), value, webClient.origin.string()); | 170 RefPtrWillBeRawPtr<MessageEvent> event = MessageEvent::create(ports.release(
), value, webClient.origin.string()); |
| 171 event->setType(EventTypeNames::crossoriginmessage); | 171 event->setType(EventTypeNames::crossoriginmessage); |
| 172 m_workerGlobalScope->dispatchEvent(event); | 172 m_workerGlobalScope->dispatchEvent(event); |
| 173 } | 173 } |
| 174 | 174 |
| 175 void ServiceWorkerGlobalScopeProxy::reportException(const String& errorMessage,
int lineNumber, int columnNumber, const String& sourceURL) | 175 void ServiceWorkerGlobalScopeProxy::reportException(const String& errorMessage,
int lineNumber, int columnNumber, const String& sourceURL, int) |
| 176 { | 176 { |
| 177 m_client.reportException(errorMessage, lineNumber, columnNumber, sourceURL); | 177 m_client.reportException(errorMessage, lineNumber, columnNumber, sourceURL); |
| 178 } | 178 } |
| 179 | 179 |
| 180 void ServiceWorkerGlobalScopeProxy::reportConsoleMessage(PassRefPtrWillBeRawPtr<
ConsoleMessage> consoleMessage) | 180 void ServiceWorkerGlobalScopeProxy::reportConsoleMessage(PassRefPtrWillBeRawPtr<
ConsoleMessage> consoleMessage) |
| 181 { | 181 { |
| 182 m_client.reportConsoleMessage(consoleMessage->source(), consoleMessage->leve
l(), consoleMessage->message(), consoleMessage->lineNumber(), consoleMessage->ur
l()); | 182 m_client.reportConsoleMessage(consoleMessage->source(), consoleMessage->leve
l(), consoleMessage->message(), consoleMessage->lineNumber(), consoleMessage->ur
l()); |
| 183 } | 183 } |
| 184 | 184 |
| 185 void ServiceWorkerGlobalScopeProxy::postMessageToPageInspector(const String& mes
sage) | 185 void ServiceWorkerGlobalScopeProxy::postMessageToPageInspector(const String& mes
sage) |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 | 217 |
| 218 ServiceWorkerGlobalScopeProxy::ServiceWorkerGlobalScopeProxy(WebEmbeddedWorkerIm
pl& embeddedWorker, Document& document, WebServiceWorkerContextClient& client) | 218 ServiceWorkerGlobalScopeProxy::ServiceWorkerGlobalScopeProxy(WebEmbeddedWorkerIm
pl& embeddedWorker, Document& document, WebServiceWorkerContextClient& client) |
| 219 : m_embeddedWorker(embeddedWorker) | 219 : m_embeddedWorker(embeddedWorker) |
| 220 , m_document(document) | 220 , m_document(document) |
| 221 , m_client(client) | 221 , m_client(client) |
| 222 , m_workerGlobalScope(0) | 222 , m_workerGlobalScope(0) |
| 223 { | 223 { |
| 224 } | 224 } |
| 225 | 225 |
| 226 } // namespace blink | 226 } // namespace blink |
| OLD | NEW |