diff options
author | Sadrul Habib Chowdhury <sadrul@chromium.org> | 2015-03-09 21:34:22 -0400 |
---|---|---|
committer | Sadrul Habib Chowdhury <sadrul@chromium.org> | 2015-03-10 01:36:17 +0000 |
commit | c351e9566c24e050a57671bee6beeaad1771ab84 (patch) | |
tree | 82b49d9fb851006710348f9629a0cfffc83cfdc9 /ipc | |
parent | c7f55a22d68f5db5434b9877f28a6c6072ecc10c (diff) | |
download | chromium_src-c351e9566c24e050a57671bee6beeaad1771ab84.zip chromium_src-c351e9566c24e050a57671bee6beeaad1771ab84.tar.gz chromium_src-c351e9566c24e050a57671bee6beeaad1771ab84.tar.bz2 |
x11: Use scoped_ptr<> for X11 objects where it makes sense.
Introduce gfx::XScopedPtr<> as a convenience wrapper around scoped_ptr<>
for managing X11 objects. The return types of the X11 deleter functions are
somewhat inconsistent (e.g. XFree returns int, whereas XIFreeDeviceInfo
doesn't return anything), which makes this a bit tricky. So introduce a
custom deleter gfx::XObjectDeleter to use with XScopedPtr<>. Using this
XScopedPtr<> allows for cleaner code in a few places, and should generally
make it easier to manage X11 objects.
Additional clean-ups:
. content/common/gpu/x_util.cc is unused. So remove that.
. ui::XScopedString is unused. So remove that.
. DeviceListCacheX11 has support for maintaining the device-list cache for
multiple X11 connections, but chrome doesn't have support for more than
one. So replace the map with a single cache. (necessitated by the use of
XScopedPtr<> in DeviceList.)
BUG=none
R=piman@chromium.org, sky@chromium.org
Review URL: https://codereview.chromium.org/989993002
Cr-Commit-Position: refs/heads/master@{#319809}
Diffstat (limited to 'ipc')
0 files changed, 0 insertions, 0 deletions