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

Side by Side Diff: base/message_pump_glib.h

Issue 8220: Own the GLib poll FD; it should not be on the stack. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years, 1 month 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
« no previous file with comments | « no previous file | base/message_pump_glib.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2008 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 #ifndef BASE_MESSAGE_PUMP_GLIB_H_ 5 #ifndef BASE_MESSAGE_PUMP_GLIB_H_
6 #define BASE_MESSAGE_PUMP_GLIB_H_ 6 #define BASE_MESSAGE_PUMP_GLIB_H_
7 7
8 #include <glib.h> 8 #include <glib.h>
9 9
10 #include "base/message_pump.h" 10 #include "base/message_pump.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 // with our state. When ScheduleWork is called, we write into the pipe which 84 // with our state. When ScheduleWork is called, we write into the pipe which
85 // ensures poll will not sleep, since we use the read end as an event source. 85 // ensures poll will not sleep, since we use the read end as an event source.
86 // When we find data pending on the pipe, we clear it out and know we have 86 // When we find data pending on the pipe, we clear it out and know we have
87 // been given new work. 87 // been given new work.
88 int write_fd_work_scheduled_; 88 int write_fd_work_scheduled_;
89 int read_fd_work_scheduled_; 89 int read_fd_work_scheduled_;
90 90
91 // The work source. It is shared by all calls to Run and destroyed when 91 // The work source. It is shared by all calls to Run and destroyed when
92 // the message pump is destroyed. 92 // the message pump is destroyed.
93 GSource* work_source_; 93 GSource* work_source_;
94 // The GLib poll structure needs to be owned and freed by us.
95 GPollFD* work_source_poll_info_;
Evan Martin 2008/11/04 21:25:58 could it be a scoped_ptr? not sure that "info" add
94 96
95 DISALLOW_COPY_AND_ASSIGN(MessagePumpForUI); 97 DISALLOW_COPY_AND_ASSIGN(MessagePumpForUI);
96 }; 98 };
97 99
98 } // namespace base 100 } // namespace base
99 101
100 #endif // BASE_MESSAGE_PUMP_GLIB_H_ 102 #endif // BASE_MESSAGE_PUMP_GLIB_H_
OLDNEW
« no previous file with comments | « no previous file | base/message_pump_glib.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698