summaryrefslogtreecommitdiffstats
path: root/ash/host
diff options
context:
space:
mode:
authorSadrul Habib Chowdhury <sadrul@chromium.org>2015-03-09 21:34:22 -0400
committerSadrul Habib Chowdhury <sadrul@chromium.org>2015-03-10 01:36:17 +0000
commitc351e9566c24e050a57671bee6beeaad1771ab84 (patch)
tree82b49d9fb851006710348f9629a0cfffc83cfdc9 /ash/host
parentc7f55a22d68f5db5434b9877f28a6c6072ecc10c (diff)
downloadchromium_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 'ash/host')
-rw-r--r--ash/host/ash_window_tree_host_x11.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/ash/host/ash_window_tree_host_x11.cc b/ash/host/ash_window_tree_host_x11.cc
index fdd8cac..7fca1e7 100644
--- a/ash/host/ash_window_tree_host_x11.cc
+++ b/ash/host/ash_window_tree_host_x11.cc
@@ -247,7 +247,7 @@ void AshWindowTreeHostX11::SetCrOSTapPaused(bool state) {
// Temporarily pause tap-to-click when the cursor is hidden.
Atom prop = atom_cache()->GetAtom("Tap Paused");
unsigned char value = state;
- XIDeviceList dev_list =
+ const XIDeviceList& dev_list =
ui::DeviceListCacheX11::GetInstance()->GetXI2DeviceList(xdisplay());
// Only slave pointer devices could possibly have tap-paused property.