| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 25 matching lines...) Expand all Loading... |
| 36 #include "bindings/core/v8/ScriptController.h" | 36 #include "bindings/core/v8/ScriptController.h" |
| 37 #include "core/dom/Document.h" | 37 #include "core/dom/Document.h" |
| 38 #include "core/dom/ExceptionCode.h" | 38 #include "core/dom/ExceptionCode.h" |
| 39 #include "core/dom/ExecutionContext.h" | 39 #include "core/dom/ExecutionContext.h" |
| 40 #include "core/events/MessageEvent.h" | 40 #include "core/events/MessageEvent.h" |
| 41 #include "core/fileapi/Blob.h" | 41 #include "core/fileapi/Blob.h" |
| 42 #include "core/frame/ConsoleTypes.h" | 42 #include "core/frame/ConsoleTypes.h" |
| 43 #include "core/frame/LocalDOMWindow.h" | 43 #include "core/frame/LocalDOMWindow.h" |
| 44 #include "core/frame/LocalFrame.h" | 44 #include "core/frame/LocalFrame.h" |
| 45 #include "core/frame/csp/ContentSecurityPolicy.h" | 45 #include "core/frame/csp/ContentSecurityPolicy.h" |
| 46 #include "core/inspector/ConsoleMessage.h" |
| 46 #include "core/inspector/ScriptCallStack.h" | 47 #include "core/inspector/ScriptCallStack.h" |
| 47 #include "modules/websockets/CloseEvent.h" | 48 #include "modules/websockets/CloseEvent.h" |
| 48 #include "platform/Logging.h" | 49 #include "platform/Logging.h" |
| 49 #include "platform/blob/BlobData.h" | 50 #include "platform/blob/BlobData.h" |
| 50 #include "platform/heap/Handle.h" | 51 #include "platform/heap/Handle.h" |
| 51 #include "platform/weborigin/KnownPorts.h" | 52 #include "platform/weborigin/KnownPorts.h" |
| 52 #include "platform/weborigin/SecurityOrigin.h" | 53 #include "platform/weborigin/SecurityOrigin.h" |
| 53 #include "public/platform/Platform.h" | 54 #include "public/platform/Platform.h" |
| 54 #include "wtf/ArrayBuffer.h" | 55 #include "wtf/ArrayBuffer.h" |
| 55 #include "wtf/ArrayBufferView.h" | 56 #include "wtf/ArrayBufferView.h" |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 ScriptWrappable::init(this); | 238 ScriptWrappable::init(this); |
| 238 } | 239 } |
| 239 | 240 |
| 240 DOMWebSocket::~DOMWebSocket() | 241 DOMWebSocket::~DOMWebSocket() |
| 241 { | 242 { |
| 242 ASSERT(!m_channel); | 243 ASSERT(!m_channel); |
| 243 } | 244 } |
| 244 | 245 |
| 245 void DOMWebSocket::logError(const String& message) | 246 void DOMWebSocket::logError(const String& message) |
| 246 { | 247 { |
| 247 executionContext()->addConsoleMessage(JSMessageSource, ErrorMessageLevel, me
ssage); | 248 executionContext()->addConsoleMessage(ConsoleMessage::create(JSMessageSource
, ErrorMessageLevel, message)); |
| 248 } | 249 } |
| 249 | 250 |
| 250 DOMWebSocket* DOMWebSocket::create(ExecutionContext* context, const String& url,
ExceptionState& exceptionState) | 251 DOMWebSocket* DOMWebSocket::create(ExecutionContext* context, const String& url,
ExceptionState& exceptionState) |
| 251 { | 252 { |
| 252 Vector<String> protocols; | 253 Vector<String> protocols; |
| 253 return create(context, url, protocols, exceptionState); | 254 return create(context, url, protocols, exceptionState); |
| 254 } | 255 } |
| 255 | 256 |
| 256 DOMWebSocket* DOMWebSocket::create(ExecutionContext* context, const String& url,
const Vector<String>& protocols, ExceptionState& exceptionState) | 257 DOMWebSocket* DOMWebSocket::create(ExecutionContext* context, const String& url,
const Vector<String>& protocols, ExceptionState& exceptionState) |
| 257 { | 258 { |
| (...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 687 | 688 |
| 688 void DOMWebSocket::trace(Visitor* visitor) | 689 void DOMWebSocket::trace(Visitor* visitor) |
| 689 { | 690 { |
| 690 visitor->trace(m_channel); | 691 visitor->trace(m_channel); |
| 691 visitor->trace(m_eventQueue); | 692 visitor->trace(m_eventQueue); |
| 692 WebSocketChannelClient::trace(visitor); | 693 WebSocketChannelClient::trace(visitor); |
| 693 EventTargetWithInlineData::trace(visitor); | 694 EventTargetWithInlineData::trace(visitor); |
| 694 } | 695 } |
| 695 | 696 |
| 696 } // namespace blink | 697 } // namespace blink |
| OLD | NEW |