Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright 2012 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2012 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 12 matching lines...) Expand all Loading... | |
| 23 CustomSocketServer(rtc::Thread* thread, GtkMainWnd* wnd) | 23 CustomSocketServer(rtc::Thread* thread, GtkMainWnd* wnd) |
| 24 : thread_(thread), wnd_(wnd), conductor_(NULL), client_(NULL) {} | 24 : thread_(thread), wnd_(wnd), conductor_(NULL), client_(NULL) {} |
| 25 virtual ~CustomSocketServer() {} | 25 virtual ~CustomSocketServer() {} |
| 26 | 26 |
| 27 void set_client(PeerConnectionClient* client) { client_ = client; } | 27 void set_client(PeerConnectionClient* client) { client_ = client; } |
| 28 void set_conductor(Conductor* conductor) { conductor_ = conductor; } | 28 void set_conductor(Conductor* conductor) { conductor_ = conductor; } |
| 29 | 29 |
| 30 // Override so that we can also pump the GTK message loop. | 30 // Override so that we can also pump the GTK message loop. |
| 31 virtual bool Wait(int cms, bool process_io) { | 31 virtual bool Wait(int cms, bool process_io) { |
| 32 // Pump GTK events. | 32 // Pump GTK events. |
| 33 // TODO: We really should move either the socket server or UI to a | 33 // TODO: We really should move either the socket server or UI to a |
|
joachim
2015/12/08 23:23:44
This fails with "Missing username in TODO", who sh
kjellander_webrtc
2015/12/09 14:41:47
I suggest just pick the one that shows up in git b
| |
| 34 // different thread. Alternatively we could look at merging the two loops | 34 // different thread. Alternatively we could look at merging the two loops |
| 35 // by implementing a dispatcher for the socket server and/or use | 35 // by implementing a dispatcher for the socket server and/or use |
| 36 // g_main_context_set_poll_func. | 36 // g_main_context_set_poll_func. |
| 37 while (gtk_events_pending()) | 37 while (gtk_events_pending()) |
| 38 gtk_main_iteration(); | 38 gtk_main_iteration(); |
| 39 | 39 |
| 40 if (!wnd_->IsWindow() && !conductor_->connection_active() && | 40 if (!wnd_->IsWindow() && !conductor_->connection_active() && |
| 41 client_ != NULL && !client_->is_connected()) { | 41 client_ != NULL && !client_->is_connected()) { |
| 42 thread_->Quit(); | 42 thread_->Quit(); |
| 43 } | 43 } |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 89 new rtc::RefCountedObject<Conductor>(&client, &wnd)); | 89 new rtc::RefCountedObject<Conductor>(&client, &wnd)); |
| 90 socket_server.set_client(&client); | 90 socket_server.set_client(&client); |
| 91 socket_server.set_conductor(conductor); | 91 socket_server.set_conductor(conductor); |
| 92 | 92 |
| 93 thread->Run(); | 93 thread->Run(); |
| 94 | 94 |
| 95 // gtk_main(); | 95 // gtk_main(); |
| 96 wnd.Destroy(); | 96 wnd.Destroy(); |
| 97 | 97 |
| 98 thread->set_socketserver(NULL); | 98 thread->set_socketserver(NULL); |
| 99 // TODO: Run the Gtk main loop to tear down the connection. | 99 // TODO: Run the Gtk main loop to tear down the connection. |
|
joachim
2015/12/08 23:23:44
This fails with "Missing username in TODO", who sh
kjellander_webrtc
2015/12/09 14:41:47
henrike in this case too, i.e. TODO(henrike):
| |
| 100 //while (gtk_events_pending()) { | 100 /* |
| 101 // gtk_main_iteration(); | 101 while (gtk_events_pending()) { |
| 102 //} | 102 gtk_main_iteration(); |
| 103 } | |
| 104 */ | |
| 103 rtc::CleanupSSL(); | 105 rtc::CleanupSSL(); |
| 104 return 0; | 106 return 0; |
| 105 } | 107 } |
| OLD | NEW |