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

Side by Side Diff: ppapi/utility/websocket/websocket_api.cc

Issue 10696157: Add support for threadsafe completion callback factory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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 #include "ppapi/utility/websocket/websocket_api.h" 5 #include "ppapi/utility/websocket/websocket_api.h"
6 6
7 #include "ppapi/c/pp_errors.h" 7 #include "ppapi/c/pp_errors.h"
8 #include "ppapi/c/pp_macros.h" 8 #include "ppapi/c/pp_macros.h"
9 #include "ppapi/cpp/instance.h" 9 #include "ppapi/cpp/instance.h"
10 #include "ppapi/cpp/module.h" 10 #include "ppapi/cpp/module.h"
11 #include "ppapi/cpp/module_impl.h" 11 #include "ppapi/cpp/module_impl.h"
12 #include "ppapi/cpp/var.h" 12 #include "ppapi/cpp/var.h"
13 #include "ppapi/cpp/websocket.h" 13 #include "ppapi/cpp/websocket.h"
14 #include "ppapi/utility/completion_callback_factory.h" 14 #include "ppapi/utility/completion_callback_factory.h"
15 15
16 #ifdef SendMessage
17 #undef SendMessage
18 #endif
19
16 namespace pp { 20 namespace pp {
17 21
18 class WebSocketAPI::Implement : public WebSocket { 22 class WebSocketAPI::Implement : public WebSocket {
19 public: 23 public:
20 Implement(Instance* instance, WebSocketAPI* api) 24 Implement(Instance* instance, WebSocketAPI* api)
21 : WebSocket(instance), 25 : WebSocket(instance),
22 api_(api), 26 api_(api),
23 callback_factory_(PP_ALLOW_THIS_IN_INITIALIZER_LIST(this)) { 27 callback_factory_(PP_ALLOW_THIS_IN_INITIALIZER_LIST(this)) {
24 } 28 }
25 29
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 138
135 PP_WebSocketReadyState WebSocketAPI::GetReadyState() { 139 PP_WebSocketReadyState WebSocketAPI::GetReadyState() {
136 return impl_->GetReadyState(); 140 return impl_->GetReadyState();
137 } 141 }
138 142
139 Var WebSocketAPI::GetURL() { 143 Var WebSocketAPI::GetURL() {
140 return impl_->GetURL(); 144 return impl_->GetURL();
141 } 145 }
142 146
143 } // namespace pp 147 } // namespace pp
OLDNEW
« ppapi/utility/threading/lock.cc ('K') | « ppapi/utility/threading/lock.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698