summaryrefslogtreecommitdiffstats
path: root/chrome/common/ipc_message.h
Commit message (Collapse)AuthorAgeFilesLines
* POSIX: Rename DescriptorSet to FileDescriptorSetagl@chromium.org2009-02-121-9/+9
| | | | | | | This is just following up on a code review promise. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9676 0039d316-1c4b-4281-b951-d872f2087c98
* POSIX: Clean up DescriptorSetagl@chromium.org2009-02-121-3/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | In general, the IPC Message objects are const and the iterator state is a void* kept by the code which is doing the deserialisation. However, now that we have an array of file descriptors, the index of the next file descriptor is part of the iteration state and is kept /inside/ the Message (in the DescriptorSet). This means that it's a mutable member, which is never too nice and also, since the logging functions want to parse a message multiple times, we've had to turn off returning an error when one runs off the end of the array. Also, the Message copy constructor and assignment function alters the /source/ Message, by stealing all of its descriptors This patch encodes the index of each file descriptor on the wire. So the state is moved from inside the DescriptorSet into the serialised data. Additionally, the DescriptorSet is made into a lazyily created scoped_refptr, solving the problems with copying messages. Review URL: http://codereview.chromium.org/20275 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9644 0039d316-1c4b-4281-b951-d872f2087c98
* POSIX: basic IPC loggingagl@chromium.org2009-02-121-3/+2
| | | | | | | | | | For the moment, we enable IPC logging with an environment variable (CHROME_IPC_LOGGING) and log everything to stderr. Review URL: http://codereview.chromium.org/20156 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9643 0039d316-1c4b-4281-b951-d872f2087c98
* POSIX: Transfer network data using shared memoryagl@chromium.org2009-02-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | This patch adds the long planned support for sharing memory on POSIX by transporting file descriptors. It largely builds on the shared memory cleanup work by jrg. We move FileDescriptor out of chrome/common/file_descriptor_posix.h and into base/file_descriptor_posix.h. Since all that's left in the chrome/common verion is the DescriptorSet, those files are renamed to descriptor_set.[h|cc]. The SharedMemoryHandle on POSIX then becomes a typedef to a FileDescriptor and thus can be serialised over IPC. After that, it's mostly a case of cleaning up those snippets of code which considered SharedMemoryHandles to be scaler values. Review URL: http://codereview.chromium.org/21208 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9580 0039d316-1c4b-4281-b951-d872f2087c98
* FileDescriptor: passing fds over IPCagl@chromium.org2009-02-071-3/+17
| | | | | | | | | This patch introduces a FileDescriptor object which can be included in IPC messages and will perform the magic needed to pass file descriptors over IPC. After some consideration, Windows will continue to do the current DuplicateHandle tricks. Review URL: http://codereview.chromium.org/20027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9369 0039d316-1c4b-4281-b951-d872f2087c98
* WaitableEvent is the replacement for Windows events. Previously in the code, ↵agl@chromium.org2009-01-151-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | a HANDLE from CreateEvent was used for signaling, both within a process and across processes. WaitableEvent is the cross platform replacement for this. To convert: * HANDLE -> base::WaitableEvent* * ScopedHandle -> scoped_ptr<base::WaitableEvent> * CreateEvent -> new base::WaitableEvent * SetEvent -> base::WaitableEvent::Signal * ResetEvent -> base::WaitableEvent::Reset * ObjectWatcher -> base::WaitableEventWatcher * WaitForMultipleObjects -> static base::WaitableEvent::WaitMany ObjectWatcher remains for Windows specific code. WaitableEventWatcher has an identical interface save, * It uses WaitableEvents, not HANDLEs * It returns void from StartWatching and StopWatcher, rather than errors. System internal errors are fatal to the address space IMPORTANT: There are semantic differences between the different platforms. WaitableEvents on Windows are implemented on top of events. Windows events work across process and this is used mostly for modal dialog support. Windows events can be duplicated with DuplicateHandle. On other platforms, WaitableEvent works only within a single process. In the future we shall have to replace the current uses of cross-process events with IPCs. BEWARE: HANDLE, on Windows, is a void *. Since any pointer type coerces to void *, you can pass a WaitableEvent * where a HANDLE is expected without any build-time errors. Review URL: http://codereview.chromium.org/16554 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8126 0039d316-1c4b-4281-b951-d872f2087c98
* Adds missing virtual destructors on a couple of interface classes.darin@google.com2008-09-061-0/+2
| | | | | | | | | Patch contributed by knorton@google.com See http://codereview.chromium.org/270 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1822 0039d316-1c4b-4281-b951-d872f2087c98
* Use a more compact license header in source files.license.bot2008-08-241-28/+4
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1287 0039d316-1c4b-4281-b951-d872f2087c98
* Add chrome to the repository.initial.commit2008-07-261-0/+263
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15 0039d316-1c4b-4281-b951-d872f2087c98