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

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: export AssertLockHeld Created 8 years, 6 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 21 matching lines...) Expand all
32 explicit PPB_WebSocket_Impl(PP_Instance instance); 32 explicit PPB_WebSocket_Impl(PP_Instance instance);
33 virtual ~PPB_WebSocket_Impl(); 33 virtual ~PPB_WebSocket_Impl();
34 34
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(
43 const PP_Var protocols[], 43 PP_Var url,
44 uint32_t protocol_count, 44 const PP_Var protocols[],
45 PP_CompletionCallback callback) OVERRIDE; 45 uint32_t protocol_count,
46 virtual int32_t Close(uint16_t code, 46 scoped_refptr< ::ppapi::TrackedCallback> callback) OVERRIDE;
47 PP_Var reason, 47 virtual int32_t Close(
48 PP_CompletionCallback callback) OVERRIDE; 48 uint16_t code,
49 virtual int32_t ReceiveMessage(PP_Var* message, 49 PP_Var reason,
50 PP_CompletionCallback callback) OVERRIDE; 50 scoped_refptr< ::ppapi::TrackedCallback> callback) OVERRIDE;
51 virtual int32_t ReceiveMessage(
52 PP_Var* message,
53 scoped_refptr< ::ppapi::TrackedCallback> callback) OVERRIDE;
51 virtual int32_t SendMessage(PP_Var message) OVERRIDE; 54 virtual int32_t SendMessage(PP_Var message) OVERRIDE;
52 virtual uint64_t GetBufferedAmount() OVERRIDE; 55 virtual uint64_t GetBufferedAmount() OVERRIDE;
53 virtual uint16_t GetCloseCode() OVERRIDE; 56 virtual uint16_t GetCloseCode() OVERRIDE;
54 virtual PP_Var GetCloseReason() OVERRIDE; 57 virtual PP_Var GetCloseReason() OVERRIDE;
55 virtual PP_Bool GetCloseWasClean() OVERRIDE; 58 virtual PP_Bool GetCloseWasClean() OVERRIDE;
56 virtual PP_Var GetExtensions() OVERRIDE; 59 virtual PP_Var GetExtensions() OVERRIDE;
57 virtual PP_Var GetProtocol() OVERRIDE; 60 virtual PP_Var GetProtocol() OVERRIDE;
58 virtual PP_WebSocketReadyState GetReadyState() OVERRIDE; 61 virtual PP_WebSocketReadyState GetReadyState() OVERRIDE;
59 virtual PP_Var GetURL() OVERRIDE; 62 virtual PP_Var GetURL() OVERRIDE;
60 63
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 // specification. The calculated value can be read via GetBufferedAmount(). 146 // specification. The calculated value can be read via GetBufferedAmount().
144 uint64_t buffered_amount_after_close_; 147 uint64_t buffered_amount_after_close_;
145 148
146 DISALLOW_COPY_AND_ASSIGN(PPB_WebSocket_Impl); 149 DISALLOW_COPY_AND_ASSIGN(PPB_WebSocket_Impl);
147 }; 150 };
148 151
149 } // namespace ppapi 152 } // namespace ppapi
150 } // namespace webkit 153 } // namespace webkit
151 154
152 #endif // WEBKIT_PLUGINS_PPAPI_PPB_WEBSOCKET_IMPL_H_ 155 #endif // WEBKIT_PLUGINS_PPAPI_PPB_WEBSOCKET_IMPL_H_
OLDNEW
« no previous file with comments | « webkit/plugins/ppapi/ppb_video_decoder_impl.cc ('k') | webkit/plugins/ppapi/ppb_websocket_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698