From d65adb173f09a837c96f96fc24a258f439e46e58 Mon Sep 17 00:00:00 2001 From: "gspencer@chromium.org" Date: Wed, 28 Apr 2010 17:26:49 +0000 Subject: This adds in the ability for Chrome to generate windows with snapshots of all currently open tabs in all browsers. This is needed for overview mode on ChromeOS. BUG=http://code.google.com/p/chromium-os/issues/detail?id=1170 TEST=Ran Chrome under ChromeOS with updated window manager. Review URL: http://codereview.chromium.org/661237 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45824 0039d316-1c4b-4281-b951-d872f2087c98 --- base/file_descriptor_posix.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'base') diff --git a/base/file_descriptor_posix.h b/base/file_descriptor_posix.h index e9199eda..abc0789 100644 --- a/base/file_descriptor_posix.h +++ b/base/file_descriptor_posix.h @@ -24,6 +24,15 @@ struct FileDescriptor { : fd(ifd), auto_close(iauto_close) { } + bool operator==(const FileDescriptor& other) const { + return (fd == other.fd && auto_close == other.auto_close); + } + + // A comparison operator so that we can use these as keys in a std::map. + bool operator<(const FileDescriptor& other) const { + return other.fd < fd; + } + int fd; // If true, this file descriptor should be closed after it has been used. For // example an IPC system might interpret this flag as indicating that the -- cgit v1.1