| Index: ui/base/x/x11_util.cc
|
| diff --git a/ui/base/x/x11_util.cc b/ui/base/x/x11_util.cc
|
| index 4bfd5c7ee9f9d8222c2a4f42e6a3f7252a6a7d79..5ab953437ed56a3010bf012ebc9c18f146ba2633 100644
|
| --- a/ui/base/x/x11_util.cc
|
| +++ b/ui/base/x/x11_util.cc
|
| @@ -167,6 +167,10 @@ class XCustomCursorCache {
|
| cache_.clear();
|
| }
|
|
|
| + const XcursorImage* GetXcursorImage(::Cursor cursor) const {
|
| + return cache_.find(cursor)->second->image();
|
| + }
|
| +
|
| private:
|
| friend struct DefaultSingletonTraits<XCustomCursorCache>;
|
|
|
| @@ -199,6 +203,10 @@ class XCustomCursorCache {
|
| return false;
|
| }
|
|
|
| + const XcursorImage* image() const {
|
| + return image_;
|
| + };
|
| +
|
| private:
|
| XcursorImage* image_;
|
| int ref_;
|
| @@ -315,11 +323,6 @@ bool QueryRenderSupport(Display* dpy) {
|
| return cursor_cache->GetCursor(cursor_shape);
|
| }
|
|
|
| -void ResetXCursorCache() {
|
| - delete cursor_cache;
|
| - cursor_cache = NULL;
|
| -}
|
| -
|
| ::Cursor CreateReffedCustomXCursor(XcursorImage* image) {
|
| return XCustomCursorCache::GetInstance()->InstallCustomCursor(image);
|
| }
|
| @@ -1271,6 +1274,18 @@ void XScopedCursor::reset(::Cursor cursor) {
|
| cursor_ = cursor;
|
| }
|
|
|
| +namespace test {
|
| +
|
| +void ResetXCursorCache() {
|
| + delete cursor_cache;
|
| + cursor_cache = NULL;
|
| +}
|
| +
|
| +const XcursorImage* GetCachedXcursorImage(::Cursor cursor) {
|
| + return XCustomCursorCache::GetInstance()->GetXcursorImage(cursor);
|
| +}
|
| +}
|
| +
|
| // ----------------------------------------------------------------------------
|
| // These functions are declared in x11_util_internal.h because they require
|
| // XLib.h to be included, and it conflicts with many other headers.
|
|
|