OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
719 } | 719 } |
720 | 720 |
721 /////////////////////////////////////////////////////////////////////////////// | 721 /////////////////////////////////////////////////////////////////////////////// |
722 // Win32SocketServer | 722 // Win32SocketServer |
723 // Provides cricket base services on top of a win32 gui thread | 723 // Provides cricket base services on top of a win32 gui thread |
724 /////////////////////////////////////////////////////////////////////////////// | 724 /////////////////////////////////////////////////////////////////////////////// |
725 | 725 |
726 static UINT s_wm_wakeup_id = 0; | 726 static UINT s_wm_wakeup_id = 0; |
727 const TCHAR Win32SocketServer::kWindowName[] = L"libjingle Message Window"; | 727 const TCHAR Win32SocketServer::kWindowName[] = L"libjingle Message Window"; |
728 | 728 |
729 Win32SocketServer::Win32SocketServer(MessageQueue* message_queue) | 729 Win32SocketServer::Win32SocketServer() |
730 : message_queue_(message_queue), | 730 : wnd_(this), |
731 wnd_(this), | |
732 posted_(false), | 731 posted_(false), |
733 hdlg_(nullptr) { | 732 hdlg_(nullptr) { |
734 if (s_wm_wakeup_id == 0) | 733 if (s_wm_wakeup_id == 0) |
735 s_wm_wakeup_id = RegisterWindowMessage(L"WM_WAKEUP"); | 734 s_wm_wakeup_id = RegisterWindowMessage(L"WM_WAKEUP"); |
736 if (!wnd_.Create(nullptr, kWindowName, 0, 0, 0, 0, 0, 0)) { | 735 if (!wnd_.Create(nullptr, kWindowName, 0, 0, 0, 0, 0, 0)) { |
737 LOG_GLE(LS_ERROR) << "Failed to create message window."; | 736 LOG_GLE(LS_ERROR) << "Failed to create message window."; |
738 } | 737 } |
739 } | 738 } |
740 | 739 |
741 Win32SocketServer::~Win32SocketServer() { | 740 Win32SocketServer::~Win32SocketServer() { |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
858 bool handled = false; | 857 bool handled = false; |
859 if (wm == s_wm_wakeup_id || (wm == WM_TIMER && wp == 1)) { | 858 if (wm == s_wm_wakeup_id || (wm == WM_TIMER && wp == 1)) { |
860 ss_->Pump(); | 859 ss_->Pump(); |
861 lr = 0; | 860 lr = 0; |
862 handled = true; | 861 handled = true; |
863 } | 862 } |
864 return handled; | 863 return handled; |
865 } | 864 } |
866 | 865 |
867 } // namespace rtc | 866 } // namespace rtc |
OLD | NEW |