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 #include "webkit/plugins/ppapi/ppb_websocket_impl.h" | 5 #include "webkit/plugins/ppapi/ppb_websocket_impl.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 return state == PP_WEBSOCKETREADYSTATE_OPEN || | 71 return state == PP_WEBSOCKETREADYSTATE_OPEN || |
72 state == PP_WEBSOCKETREADYSTATE_CLOSING; | 72 state == PP_WEBSOCKETREADYSTATE_CLOSING; |
73 } | 73 } |
74 | 74 |
75 } // namespace | 75 } // namespace |
76 | 76 |
77 namespace webkit { | 77 namespace webkit { |
78 namespace ppapi { | 78 namespace ppapi { |
79 | 79 |
80 PPB_WebSocket_Impl::PPB_WebSocket_Impl(PP_Instance instance) | 80 PPB_WebSocket_Impl::PPB_WebSocket_Impl(PP_Instance instance) |
81 : Resource(instance), | 81 : Resource(::ppapi::OBJECT_IS_IMPL, instance), |
82 state_(PP_WEBSOCKETREADYSTATE_INVALID), | 82 state_(PP_WEBSOCKETREADYSTATE_INVALID), |
83 error_was_received_(false), | 83 error_was_received_(false), |
84 receive_callback_var_(NULL), | 84 receive_callback_var_(NULL), |
85 wait_for_receive_(false), | 85 wait_for_receive_(false), |
86 close_code_(0), | 86 close_code_(0), |
87 close_was_clean_(PP_FALSE), | 87 close_was_clean_(PP_FALSE), |
88 empty_string_(new StringVar("", 0)), | 88 empty_string_(new StringVar("", 0)), |
89 buffered_amount_(0), | 89 buffered_amount_(0), |
90 buffered_amount_after_close_(0) { | 90 buffered_amount_after_close_(0) { |
91 } | 91 } |
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
526 | 526 |
527 *receive_callback_var_ = received_messages_.front()->GetPPVar(); | 527 *receive_callback_var_ = received_messages_.front()->GetPPVar(); |
528 received_messages_.pop(); | 528 received_messages_.pop(); |
529 receive_callback_var_ = NULL; | 529 receive_callback_var_ = NULL; |
530 wait_for_receive_ = false; | 530 wait_for_receive_ = false; |
531 return PP_OK; | 531 return PP_OK; |
532 } | 532 } |
533 | 533 |
534 } // namespace ppapi | 534 } // namespace ppapi |
535 } // namespace webkit | 535 } // namespace webkit |
OLD | NEW |