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

Side by Side Diff: webrtc/examples/peerconnection/client/linux/main.cc

Issue 1504283004: Enable cpplint for webrtc/examples and fix all uncovered cpplint errors. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Add "henrike" to TODO markers Created 5 years 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
OLDNEW
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
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(henrike): We really should move either the socket server or UI to a
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
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(henrike): Run the Gtk main loop to tear down the connection.
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 }
OLDNEW
« no previous file with comments | « webrtc/examples/peerconnection/client/flagdefs.h ('k') | webrtc/examples/peerconnection/client/linux/main_wnd.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698