OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_TEST_CHROMEDRIVER_NET_WEBSOCKET_H_ | 5 #ifndef CHROME_TEST_CHROMEDRIVER_NET_WEBSOCKET_H_ |
6 #define CHROME_TEST_CHROMEDRIVER_NET_WEBSOCKET_H_ | 6 #define CHROME_TEST_CHROMEDRIVER_NET_WEBSOCKET_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | |
11 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| 11 #include "base/macros.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "base/threading/thread_checker.h" | 13 #include "base/threading/thread_checker.h" |
14 #include "net/base/completion_callback.h" | 14 #include "net/base/completion_callback.h" |
15 #include "net/socket/tcp_client_socket.h" | 15 #include "net/socket/tcp_client_socket.h" |
16 #include "net/websockets/websocket_frame_parser.h" | 16 #include "net/websockets/websocket_frame_parser.h" |
17 #include "url/gurl.h" | 17 #include "url/gurl.h" |
18 | 18 |
19 namespace net { | 19 namespace net { |
20 class DrainableIOBuffer; | 20 class DrainableIOBuffer; |
21 class IOBufferWithSize; | 21 class IOBufferWithSize; |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 // Called when a WebSocket message is received. | 90 // Called when a WebSocket message is received. |
91 virtual void OnMessageReceived(const std::string& message) = 0; | 91 virtual void OnMessageReceived(const std::string& message) = 0; |
92 | 92 |
93 // Called when the WebSocket connection closes. Will be called at most once. | 93 // Called when the WebSocket connection closes. Will be called at most once. |
94 // Will not be called if the connection was never established or if the close | 94 // Will not be called if the connection was never established or if the close |
95 // was initiated by the client. | 95 // was initiated by the client. |
96 virtual void OnClose() = 0; | 96 virtual void OnClose() = 0; |
97 }; | 97 }; |
98 | 98 |
99 #endif // CHROME_TEST_CHROMEDRIVER_NET_WEBSOCKET_H_ | 99 #endif // CHROME_TEST_CHROMEDRIVER_NET_WEBSOCKET_H_ |
OLD | NEW |