diff options
author | toyoshim@chromium.org <toyoshim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-18 05:51:54 +0000 |
---|---|---|
committer | toyoshim@chromium.org <toyoshim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-18 05:51:54 +0000 |
commit | 081d147b55170f80e74d4172a784e7fe19b063be (patch) | |
tree | b123331bca55cc16f16cf6cf8260ea8a6b3c7bf7 /ppapi/thunk/ppb_websocket_api.h | |
parent | 8bc0cd5093b498df67db690be98e37fa2d00c26a (diff) | |
download | chromium_src-081d147b55170f80e74d4172a784e7fe19b063be.zip chromium_src-081d147b55170f80e74d4172a784e7fe19b063be.tar.gz chromium_src-081d147b55170f80e74d4172a784e7fe19b063be.tar.bz2 |
- Implement internal API and thunk
- Implement base frame for in process API
- Add basic unit tests for in process API
BUG=87310
TEST=ui_tests --gtest_filter="PPAPITest.WebSocket*"
Review URL: http://codereview.chromium.org/8571002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110664 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/thunk/ppb_websocket_api.h')
-rw-r--r-- | ppapi/thunk/ppb_websocket_api.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/ppapi/thunk/ppb_websocket_api.h b/ppapi/thunk/ppb_websocket_api.h new file mode 100644 index 0000000..ba49a0f --- /dev/null +++ b/ppapi/thunk/ppb_websocket_api.h @@ -0,0 +1,41 @@ +// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef PPAPI_THUNK_WEBSOCKET_API_H_ +#define PPAPI_THUNK_WEBSOCKET_API_H_ + +#include "ppapi/c/pp_completion_callback.h" +#include "ppapi/c/dev/ppb_websocket_dev.h" + +namespace ppapi { +namespace thunk { + +class PPB_WebSocket_API { + public: + virtual ~PPB_WebSocket_API() {} + + virtual int32_t Connect(PP_Var url, + const PP_Var protocols[], + uint32_t protocol_count, + PP_CompletionCallback callback) = 0; + virtual int32_t Close(uint16_t code, + PP_Var reason, + PP_CompletionCallback callback) = 0; + virtual int32_t ReceiveMessage(PP_Var* message, + PP_CompletionCallback callback) = 0; + virtual int32_t SendMessage(PP_Var message) = 0; + virtual uint64_t GetBufferedAmount() = 0; + virtual uint16_t GetCloseCode() = 0; + virtual PP_Var GetCloseReason() = 0; + virtual PP_Bool GetCloseWasClean() = 0; + virtual PP_Var GetExtensions() = 0; + virtual PP_Var GetProtocol() = 0; + virtual PP_WebSocketReadyState_Dev GetReadyState() = 0; + virtual PP_Var GetURL() = 0; +}; + +} // namespace thunk +} // namespace ppapi + +#endif // PPAPI_THUNK_WEBSOCKET_API_H_ |