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

Issue 989993002: x11: Use scoped_ptr<> for X11 objects where it makes sense. (Closed)

Created:
5 years, 9 months ago by sadrul
Modified:
5 years, 9 months ago
Reviewers:
sky, piman
CC:
chromium-reviews, tdanderson+views_chromium.org, yusukes+watch_chromium.org, derat+watch_chromium.org, yukishiino+watch_chromium.org, jdduke+watch_chromium.org, tdresser+watch_chromium.org, jam, penghuang+watch_chromium.org, nona+watch_chromium.org, darin-cc_chromium.org, oshima+watch_chromium.org, piman+watch_chromium.org, kalyank, James Su, stevenjb+watch_chromium.org, tfarina
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

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 Committed: https://chromium.googlesource.com/chromium/src/+/c351e9566c24e050a57671bee6beeaad1771ab84

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : . #

Patch Set 4 : . #

Patch Set 5 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+159 lines, -273 lines) Patch
M ash/host/ash_window_tree_host_x11.cc View 1 chunk +1 line, -1 line 0 comments Download
M ash/wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard_x11.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/browser/ui/libgtk2ui/x11_input_method_context_impl_gtk2.cc View 1 2 3 2 chunks +6 lines, -6 lines 0 comments Download
M content/common/BUILD.gn View 1 chunk +1 line, -4 lines 0 comments Download
M content/common/gpu/x_util.h View 1 chunk +0 lines, -10 lines 0 comments Download
D content/common/gpu/x_util.cc View 1 chunk +0 lines, -15 lines 0 comments Download
M content/content_common.gypi View 1 chunk +0 lines, -1 line 0 comments Download
M ui/base/idle/idle_query_x11.cc View 2 chunks +3 lines, -7 lines 0 comments Download
M ui/base/ime/chromeos/ime_keyboard_x11.cc View 1 chunk +3 lines, -4 lines 0 comments Download
M ui/base/x/selection_owner.cc View 1 chunk +2 lines, -4 lines 0 comments Download
M ui/base/x/x11_util.h View 2 chunks +2 lines, -18 lines 0 comments Download
M ui/base/x/x11_util.cc View 1 2 3 4 16 chunks +28 lines, -44 lines 0 comments Download
M ui/display/chromeos/x11/native_display_delegate_x11.cc View 1 2 5 chunks +15 lines, -21 lines 0 comments Download
M ui/display/util/x11/edid_parser_x11.cc View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M ui/events/devices/x11/device_data_manager_x11.cc View 3 chunks +13 lines, -13 lines 0 comments Download
M ui/events/devices/x11/device_list_cache_x11.h View 1 2 2 chunks +10 lines, -11 lines 0 comments Download
M ui/events/devices/x11/device_list_cache_x11.cc View 2 chunks +14 lines, -25 lines 0 comments Download
M ui/events/devices/x11/touch_factory_x11.cc View 2 chunks +15 lines, -15 lines 0 comments Download
M ui/gfx/x/x11_types.h View 2 chunks +13 lines, -0 lines 0 comments Download
M ui/gfx/x/x11_types.cc View 1 2 3 4 1 chunk +4 lines, -8 lines 0 comments Download
M ui/gl/gl_image_glx.cc View 2 chunks +3 lines, -12 lines 0 comments Download
M ui/gl/gl_surface_glx.cc View 4 chunks +6 lines, -21 lines 0 comments Download
M ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc View 1 2 4 chunks +11 lines, -18 lines 0 comments Download
M ui/views/widget/desktop_aura/desktop_window_tree_host_x11_unittest.cc View 1 2 1 chunk +4 lines, -11 lines 0 comments Download

Messages

Total messages: 6 (1 generated)
sadrul
sky@chromium.org: Please review changes in ash/ chrome/ and ui/ piman@chromium.org: Please review changes in content/
5 years, 9 months ago (2015-03-08 07:42:02 UTC) #2
sky
LGTM
5 years, 9 months ago (2015-03-09 15:44:49 UTC) #3
piman
LGTM, nice cleanup
5 years, 9 months ago (2015-03-09 22:33:05 UTC) #4
commit-bot: I haz the power
Patchset 5 (id:??) landed as https://crrev.com/c351e9566c24e050a57671bee6beeaad1771ab84 Cr-Commit-Position: refs/heads/master@{#319809}
5 years, 9 months ago (2015-03-10 01:36:30 UTC) #5
sadrul
5 years, 9 months ago (2015-03-10 01:47:56 UTC) #6
Message was sent while issue was closed.
Committed patchset #5 (id:70001) manually as
c351e9566c24e050a57671bee6beeaad1771ab84 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698