OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 20 matching lines...) Expand all Loading... |
31 #ifndef WebSocketStreamError_h | 31 #ifndef WebSocketStreamError_h |
32 #define WebSocketStreamError_h | 32 #define WebSocketStreamError_h |
33 | 33 |
34 #include "WebCommon.h" | 34 #include "WebCommon.h" |
35 #include "WebPrivatePtr.h" | 35 #include "WebPrivatePtr.h" |
36 | 36 |
37 #if INSIDE_BLINK | 37 #if INSIDE_BLINK |
38 #include "wtf/PassRefPtr.h" | 38 #include "wtf/PassRefPtr.h" |
39 #endif | 39 #endif |
40 | 40 |
41 namespace WebCore { class SocketStreamError; } | 41 namespace blink { class SocketStreamError; } |
42 | 42 |
43 namespace blink { | 43 namespace blink { |
44 | 44 |
45 class WebString; | 45 class WebString; |
46 | 46 |
47 class BLINK_PLATFORM_EXPORT WebSocketStreamError { | 47 class BLINK_PLATFORM_EXPORT WebSocketStreamError { |
48 public: | 48 public: |
49 WebSocketStreamError(int code, const WebString& message) { assign(code, mess
age); } | 49 WebSocketStreamError(int code, const WebString& message) { assign(code, mess
age); } |
50 WebSocketStreamError(const WebSocketStreamError& other) { assign(other); } | 50 WebSocketStreamError(const WebSocketStreamError& other) { assign(other); } |
51 ~WebSocketStreamError() { reset(); } | 51 ~WebSocketStreamError() { reset(); } |
52 | 52 |
53 void assign(int code, const WebString& message); | 53 void assign(int code, const WebString& message); |
54 void assign(const WebSocketStreamError&); | 54 void assign(const WebSocketStreamError&); |
55 void reset(); | 55 void reset(); |
56 | 56 |
57 #if INSIDE_BLINK | 57 #if INSIDE_BLINK |
58 WebSocketStreamError(WTF::PassRefPtr<WebCore::SocketStreamError>); | 58 WebSocketStreamError(WTF::PassRefPtr<blink::SocketStreamError>); |
59 WebSocketStreamError& operator=(WTF::PassRefPtr<WebCore::SocketStreamError>)
; | 59 WebSocketStreamError& operator=(WTF::PassRefPtr<blink::SocketStreamError>); |
60 operator WTF::PassRefPtr<WebCore::SocketStreamError>() const; | 60 operator WTF::PassRefPtr<blink::SocketStreamError>() const; |
61 #endif | 61 #endif |
62 | 62 |
63 private: | 63 private: |
64 WebPrivatePtr<WebCore::SocketStreamError> m_private; | 64 WebPrivatePtr<blink::SocketStreamError> m_private; |
65 }; | 65 }; |
66 | 66 |
67 } // namespace blink | 67 } // namespace blink |
68 | 68 |
69 #endif | 69 #endif |
OLD | NEW |