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

Side by Side Diff: ui/base/x/x11_util.h

Issue 27156003: linux_aura: Enable HIDPI support (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Avoid code-duplication with display_change_observer_chromeos.cc Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 UI_EXPORT bool ChangeWindowDesktop(XID window, XID destination); 295 UI_EXPORT bool ChangeWindowDesktop(XID window, XID destination);
296 296
297 // Enable the default X error handlers. These will log the error and abort 297 // Enable the default X error handlers. These will log the error and abort
298 // the process if called. Use SetX11ErrorHandlers() from x11_util_internal.h 298 // the process if called. Use SetX11ErrorHandlers() from x11_util_internal.h
299 // to set your own error handlers. 299 // to set your own error handlers.
300 UI_EXPORT void SetDefaultX11ErrorHandlers(); 300 UI_EXPORT void SetDefaultX11ErrorHandlers();
301 301
302 // Return true if a given window is in full-screen mode. 302 // Return true if a given window is in full-screen mode.
303 UI_EXPORT bool IsX11WindowFullScreen(XID window); 303 UI_EXPORT bool IsX11WindowFullScreen(XID window);
304 304
305 // Returns true if a given size is in list of bogus sizes in mm that X detects
306 // that should be ignored.
307 UI_EXPORT bool IsXDisplaySizeBlackListed(unsigned long mm_width,
308 unsigned long mm_height);
309
305 // Manages a piece of X11 allocated memory as a RefCountedMemory segment. This 310 // Manages a piece of X11 allocated memory as a RefCountedMemory segment. This
306 // object takes ownership over the passed in memory and will free it with the 311 // object takes ownership over the passed in memory and will free it with the
307 // X11 allocator when done. 312 // X11 allocator when done.
308 class UI_EXPORT XRefcountedMemory : public base::RefCountedMemory { 313 class UI_EXPORT XRefcountedMemory : public base::RefCountedMemory {
309 public: 314 public:
310 XRefcountedMemory(unsigned char* x11_data, size_t length) 315 XRefcountedMemory(unsigned char* x11_data, size_t length)
311 : x11_data_(length ? x11_data : NULL), 316 : x11_data_(length ? x11_data : NULL),
312 length_(length) { 317 length_(length) {
313 } 318 }
314 319
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 private: 382 private:
378 ::Cursor cursor_; 383 ::Cursor cursor_;
379 XDisplay* display_; 384 XDisplay* display_;
380 385
381 DISALLOW_COPY_AND_ASSIGN(XScopedCursor); 386 DISALLOW_COPY_AND_ASSIGN(XScopedCursor);
382 }; 387 };
383 388
384 } // namespace ui 389 } // namespace ui
385 390
386 #endif // UI_BASE_X_X11_UTIL_H_ 391 #endif // UI_BASE_X_X11_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698