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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 // Do not call |send| after calling this method. | 83 // Do not call |send| after calling this method. |
84 virtual void close(int code, const String& reason) = 0; | 84 virtual void close(int code, const String& reason) = 0; |
85 | 85 |
86 // Log the reason text and close the connection. Will call didClose(). | 86 // Log the reason text and close the connection. Will call didClose(). |
87 // The MessageLevel parameter will be used for the level of the message | 87 // The MessageLevel parameter will be used for the level of the message |
88 // shown at the devtools console. | 88 // shown at the devtools console. |
89 // SourceLocation parameter may be shown with the reason text | 89 // SourceLocation parameter may be shown with the reason text |
90 // at the devtools console. Even if location is specified, it may be ignored | 90 // at the devtools console. Even if location is specified, it may be ignored |
91 // and the "current" location in the sense of JavaScript execution | 91 // and the "current" location in the sense of JavaScript execution |
92 // may be shown if this method is called in a JS execution context. | 92 // may be shown if this method is called in a JS execution context. |
93 // You can pass null location if unknown. | 93 // Location should not be null. |
94 virtual void fail(const String& reason, MessageLevel, PassOwnPtr<SourceLocat
ion>) = 0; | 94 virtual void fail(const String& reason, MessageLevel, PassOwnPtr<SourceLocat
ion>) = 0; |
95 | 95 |
96 // Do not call any methods after calling this method. | 96 // Do not call any methods after calling this method. |
97 virtual void disconnect() = 0; // Will suppress didClose(). | 97 virtual void disconnect() = 0; // Will suppress didClose(). |
98 | 98 |
99 virtual ~WebSocketChannel() { } | 99 virtual ~WebSocketChannel() { } |
100 | 100 |
101 DEFINE_INLINE_VIRTUAL_TRACE() { } | 101 DEFINE_INLINE_VIRTUAL_TRACE() { } |
102 }; | 102 }; |
103 | 103 |
104 } // namespace blink | 104 } // namespace blink |
105 | 105 |
106 #endif // WebSocketChannel_h | 106 #endif // WebSocketChannel_h |
OLD | NEW |