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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 const String host() const; | 60 const String host() const; |
61 | 61 |
62 const String& clientProtocol() const; | 62 const String& clientProtocol() const; |
63 void setClientProtocol(const String&); | 63 void setClientProtocol(const String&); |
64 | 64 |
65 bool secure() const; | 65 bool secure() const; |
66 | 66 |
67 String clientOrigin() const; | 67 String clientOrigin() const; |
68 String clientLocation() const; | 68 String clientLocation() const; |
69 | 69 |
| 70 // Builds a WebSocket opening handshake string to send to the server. |
| 71 // Cookie headers will be added later by the platform code for security |
| 72 // reason. |
70 CString clientHandshakeMessage() const; | 73 CString clientHandshakeMessage() const; |
| 74 // Builds an object representing WebSocket opening handshake to pass to the |
| 75 // inspector. |
71 PassRefPtr<WebSocketHandshakeRequest> clientHandshakeRequest() const; | 76 PassRefPtr<WebSocketHandshakeRequest> clientHandshakeRequest() const; |
72 | 77 |
73 // We're collecting data for histogram in the destructor. Note that calling | 78 // We're collecting data for histogram in the destructor. Note that calling |
74 // this method affects that. | 79 // this method affects that. |
75 void reset(); | 80 void reset(); |
76 void clearDocument(); | 81 void clearDocument(); |
77 | 82 |
78 int readServerHandshake(const char* header, size_t len); | 83 int readServerHandshake(const char* header, size_t len); |
79 Mode mode() const; | 84 Mode mode() const; |
80 // Returns a string indicating the reason of failure if mode() == Failed. | 85 // Returns a string indicating the reason of failure if mode() == Failed. |
81 String failureReason() const; | 86 String failureReason() const; |
82 | 87 |
83 const AtomicString& serverWebSocketProtocol() const; | 88 const AtomicString& serverWebSocketProtocol() const; |
84 const AtomicString& serverSetCookie() const; | |
85 const AtomicString& serverSetCookie2() const; | |
86 const AtomicString& serverUpgrade() const; | 89 const AtomicString& serverUpgrade() const; |
87 const AtomicString& serverConnection() const; | 90 const AtomicString& serverConnection() const; |
88 const AtomicString& serverWebSocketAccept() const; | 91 const AtomicString& serverWebSocketAccept() const; |
89 String acceptedExtensions() const; | 92 String acceptedExtensions() const; |
90 | 93 |
91 const WebSocketHandshakeResponse& serverHandshakeResponse() const; | 94 const WebSocketHandshakeResponse& serverHandshakeResponse() const; |
92 | 95 |
93 void addExtensionProcessor(PassOwnPtr<WebSocketExtensionProcessor>); | 96 void addExtensionProcessor(PassOwnPtr<WebSocketExtensionProcessor>); |
94 | 97 |
95 static String getExpectedWebSocketAccept(const String& secWebSocketKey); | 98 static String getExpectedWebSocketAccept(const String& secWebSocketKey); |
(...skipping 25 matching lines...) Expand all Loading... |
121 | 124 |
122 String m_secWebSocketKey; | 125 String m_secWebSocketKey; |
123 String m_expectedAccept; | 126 String m_expectedAccept; |
124 | 127 |
125 WebSocketExtensionDispatcher m_extensionDispatcher; | 128 WebSocketExtensionDispatcher m_extensionDispatcher; |
126 }; | 129 }; |
127 | 130 |
128 } // namespace WebCore | 131 } // namespace WebCore |
129 | 132 |
130 #endif // WebSocketHandshake_h | 133 #endif // WebSocketHandshake_h |
OLD | NEW |