Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(320)

Side by Side Diff: webkit/plugins/ppapi/ppb_websocket_impl.h

Issue 10081020: PPAPI: Make blocking completion callbacks work. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updated TestURLLoader to test blocking callbacks. Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698