| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef UI_BASE_X_X11_UTIL_H_ | 5 #ifndef UI_BASE_X_X11_UTIL_H_ |
| 6 #define UI_BASE_X_X11_UTIL_H_ | 6 #define UI_BASE_X_X11_UTIL_H_ |
| 7 | 7 |
| 8 // This file declares utility functions for X11 (Linux only). | 8 // This file declares utility functions for X11 (Linux only). |
| 9 // | 9 // |
| 10 // These functions do not require the Xlib headers to be included (which is why | 10 // These functions do not require the Xlib headers to be included (which is why |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 | 288 |
| 289 // Manages a piece of X11 allocated memory as a RefCountedMemory segment. This | 289 // Manages a piece of X11 allocated memory as a RefCountedMemory segment. This |
| 290 // object takes ownership over the passed in memory and will free it with the | 290 // object takes ownership over the passed in memory and will free it with the |
| 291 // X11 allocator when done. | 291 // X11 allocator when done. |
| 292 class UI_BASE_EXPORT XRefcountedMemory : public base::RefCountedMemory { | 292 class UI_BASE_EXPORT XRefcountedMemory : public base::RefCountedMemory { |
| 293 public: | 293 public: |
| 294 XRefcountedMemory(unsigned char* x11_data, size_t length) | 294 XRefcountedMemory(unsigned char* x11_data, size_t length) |
| 295 : x11_data_(length ? x11_data : NULL), length_(length) {} | 295 : x11_data_(length ? x11_data : NULL), length_(length) {} |
| 296 | 296 |
| 297 // Overridden from RefCountedMemory: | 297 // Overridden from RefCountedMemory: |
| 298 virtual const unsigned char* front() const OVERRIDE; | 298 virtual const unsigned char* front() const override; |
| 299 virtual size_t size() const OVERRIDE; | 299 virtual size_t size() const override; |
| 300 | 300 |
| 301 private: | 301 private: |
| 302 virtual ~XRefcountedMemory(); | 302 virtual ~XRefcountedMemory(); |
| 303 | 303 |
| 304 unsigned char* x11_data_; | 304 unsigned char* x11_data_; |
| 305 size_t length_; | 305 size_t length_; |
| 306 | 306 |
| 307 DISALLOW_COPY_AND_ASSIGN(XRefcountedMemory); | 307 DISALLOW_COPY_AND_ASSIGN(XRefcountedMemory); |
| 308 }; | 308 }; |
| 309 | 309 |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 UI_BASE_EXPORT void ResetXCursorCache(); | 365 UI_BASE_EXPORT void ResetXCursorCache(); |
| 366 | 366 |
| 367 // Returns the cached XcursorImage for |cursor|. | 367 // Returns the cached XcursorImage for |cursor|. |
| 368 UI_BASE_EXPORT const XcursorImage* GetCachedXcursorImage(::Cursor cursor); | 368 UI_BASE_EXPORT const XcursorImage* GetCachedXcursorImage(::Cursor cursor); |
| 369 | 369 |
| 370 } // namespace test | 370 } // namespace test |
| 371 | 371 |
| 372 } // namespace ui | 372 } // namespace ui |
| 373 | 373 |
| 374 #endif // UI_BASE_X_X11_UTIL_H_ | 374 #endif // UI_BASE_X_X11_UTIL_H_ |
| OLD | NEW |