| 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 WEBKIT_PLUGINS_PPAPI_PPB_WEBSOCKET_IMPL_H_ | 5 #ifndef WEBKIT_PLUGINS_PPAPI_PPB_WEBSOCKET_IMPL_H_ |
| 6 #define WEBKIT_PLUGINS_PPAPI_PPB_WEBSOCKET_IMPL_H_ | 6 #define WEBKIT_PLUGINS_PPAPI_PPB_WEBSOCKET_IMPL_H_ |
| 7 | 7 |
| 8 #include <queue> | 8 #include <queue> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 static PP_Resource Create(PP_Instance instance); | 35 static PP_Resource Create(PP_Instance instance); |
| 36 | 36 |
| 37 // Resource overrides. | 37 // Resource overrides. |
| 38 // Returns the pointer to the thunk::PPB_WebSocket_API if it's supported. | 38 // Returns the pointer to the thunk::PPB_WebSocket_API if it's supported. |
| 39 virtual ::ppapi::thunk::PPB_WebSocket_API* AsPPB_WebSocket_API() OVERRIDE; | 39 virtual ::ppapi::thunk::PPB_WebSocket_API* AsPPB_WebSocket_API() OVERRIDE; |
| 40 | 40 |
| 41 // PPB_WebSocket_API implementation. | 41 // PPB_WebSocket_API implementation. |
| 42 virtual int32_t Connect(PP_Var url, | 42 virtual int32_t Connect(PP_Var url, |
| 43 const PP_Var protocols[], | 43 const PP_Var protocols[], |
| 44 uint32_t protocol_count, | 44 uint32_t protocol_count, |
| 45 PP_CompletionCallback callback) OVERRIDE; | 45 ::ppapi::ApiCallbackType callback) OVERRIDE; |
| 46 virtual int32_t Close(uint16_t code, | 46 virtual int32_t Close(uint16_t code, |
| 47 PP_Var reason, | 47 PP_Var reason, |
| 48 PP_CompletionCallback callback) OVERRIDE; | 48 ::ppapi::ApiCallbackType callback) OVERRIDE; |
| 49 virtual int32_t ReceiveMessage(PP_Var* message, | 49 virtual int32_t ReceiveMessage(PP_Var* message, |
| 50 PP_CompletionCallback callback) OVERRIDE; | 50 ::ppapi::ApiCallbackType callback) OVERRIDE; |
| 51 virtual int32_t SendMessage(PP_Var message) OVERRIDE; | 51 virtual int32_t SendMessage(PP_Var message) OVERRIDE; |
| 52 virtual uint64_t GetBufferedAmount() OVERRIDE; | 52 virtual uint64_t GetBufferedAmount() OVERRIDE; |
| 53 virtual uint16_t GetCloseCode() OVERRIDE; | 53 virtual uint16_t GetCloseCode() OVERRIDE; |
| 54 virtual PP_Var GetCloseReason() OVERRIDE; | 54 virtual PP_Var GetCloseReason() OVERRIDE; |
| 55 virtual PP_Bool GetCloseWasClean() OVERRIDE; | 55 virtual PP_Bool GetCloseWasClean() OVERRIDE; |
| 56 virtual PP_Var GetExtensions() OVERRIDE; | 56 virtual PP_Var GetExtensions() OVERRIDE; |
| 57 virtual PP_Var GetProtocol() OVERRIDE; | 57 virtual PP_Var GetProtocol() OVERRIDE; |
| 58 virtual PP_WebSocketReadyState GetReadyState() OVERRIDE; | 58 virtual PP_WebSocketReadyState GetReadyState() OVERRIDE; |
| 59 virtual PP_Var GetURL() OVERRIDE; | 59 virtual PP_Var GetURL() OVERRIDE; |
| 60 | 60 |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 // specification. The calculated value can be read via GetBufferedAmount(). | 143 // specification. The calculated value can be read via GetBufferedAmount(). |
| 144 uint64_t buffered_amount_after_close_; | 144 uint64_t buffered_amount_after_close_; |
| 145 | 145 |
| 146 DISALLOW_COPY_AND_ASSIGN(PPB_WebSocket_Impl); | 146 DISALLOW_COPY_AND_ASSIGN(PPB_WebSocket_Impl); |
| 147 }; | 147 }; |
| 148 | 148 |
| 149 } // namespace ppapi | 149 } // namespace ppapi |
| 150 } // namespace webkit | 150 } // namespace webkit |
| 151 | 151 |
| 152 #endif // WEBKIT_PLUGINS_PPAPI_PPB_WEBSOCKET_IMPL_H_ | 152 #endif // WEBKIT_PLUGINS_PPAPI_PPB_WEBSOCKET_IMPL_H_ |
| OLD | NEW |