Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(72)

Unified Diff: Source/Platform/chromium/public/WebSocketStreamError.h

Issue 14071008: WebSocket object should fire error event when WebSocket server can't be connected. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: Add new layouttests into TestExceptions because it depends on chromium side patch Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/Platform/chromium/public/WebSocketStreamError.h
diff --git a/Source/Platform/chromium/public/WebSocketStreamError.h b/Source/Platform/chromium/public/WebSocketStreamError.h
index f52869b3b448deea088e4edb877ec4e1256905fc..33d9780251fd08bba503cece22b93b5329425d3d 100644
--- a/Source/Platform/chromium/public/WebSocketStreamError.h
+++ b/Source/Platform/chromium/public/WebSocketStreamError.h
@@ -32,12 +32,36 @@
#define WebSocketStreamError_h
#include "WebCommon.h"
+#include "WebPrivatePtr.h"
+
+#if WEBKIT_IMPLEMENTATION
+#include <wtf/PassRefPtr.h>
+#endif
+
+namespace WebCore { class SocketStreamError; }
namespace WebKit {
+class WebString;
+
class WebSocketStreamError {
public:
- // FIXME: Define SocketStream Error codes and accessor methods.
+ WebSocketStreamError(int code, const WebString& message) { assign(code, message); }
+ WebSocketStreamError(const WebSocketStreamError& other) { assign(other); }
+ ~WebSocketStreamError() { reset(); }
+
+ WEBKIT_EXPORT void assign(int code, const WebString& message);
+ WEBKIT_EXPORT void assign(const WebSocketStreamError&);
+ WEBKIT_EXPORT void reset();
+
+#if WEBKIT_IMPLEMENTATION
+ WebSocketStreamError(WTF::PassRefPtr<WebCore::SocketStreamError>);
+ WebSocketStreamError& operator=(WTF::PassRefPtr<WebCore::SocketStreamError>);
+ operator WTF::PassRefPtr<WebCore::SocketStreamError>() const;
+#endif
+
+private:
+ WebPrivatePtr<WebCore::SocketStreamError> m_private;
};
} // namespace WebKit

Powered by Google App Engine
This is Rietveld 408576698