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

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

Issue 14061025: ui: Use base::MessageLoop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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
« no previous file with comments | « ui/base/x/selection_requestor.cc ('k') | ui/compositor/compositor.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // This file defines utility functions for X11 (Linux only). This code has been 5 // This file defines utility functions for X11 (Linux only). This code has been
6 // ported from XCB since we can't use XCB on Ubuntu while its 32-bit support 6 // ported from XCB since we can't use XCB on Ubuntu while its 32-bit support
7 // remains woefully incomplete. 7 // remains woefully incomplete.
8 8
9 #include "ui/base/x/x11_util.h" 9 #include "ui/base/x/x11_util.h"
10 10
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 static CachedPictFormats* formats = NULL; 91 static CachedPictFormats* formats = NULL;
92 if (!formats) 92 if (!formats)
93 formats = new CachedPictFormats(); 93 formats = new CachedPictFormats();
94 return formats; 94 return formats;
95 } 95 }
96 96
97 // Maximum number of CachedPictFormats we keep around. 97 // Maximum number of CachedPictFormats we keep around.
98 const size_t kMaxCacheSize = 5; 98 const size_t kMaxCacheSize = 5;
99 99
100 int DefaultX11ErrorHandler(Display* d, XErrorEvent* e) { 100 int DefaultX11ErrorHandler(Display* d, XErrorEvent* e) {
101 if (MessageLoop::current()) { 101 if (base::MessageLoop::current()) {
102 MessageLoop::current()->PostTask( 102 base::MessageLoop::current()->PostTask(
103 FROM_HERE, 103 FROM_HERE, base::Bind(&LogErrorEventDescription, d, *e));
104 base::Bind(&LogErrorEventDescription, d, *e));
105 } else { 104 } else {
106 LOG(ERROR) 105 LOG(ERROR)
107 << "X error received: " 106 << "X error received: "
108 << "serial " << e->serial << ", " 107 << "serial " << e->serial << ", "
109 << "error_code " << static_cast<int>(e->error_code) << ", " 108 << "error_code " << static_cast<int>(e->error_code) << ", "
110 << "request_code " << static_cast<int>(e->request_code) << ", " 109 << "request_code " << static_cast<int>(e->request_code) << ", "
111 << "minor_code " << static_cast<int>(e->minor_code); 110 << "minor_code " << static_cast<int>(e->minor_code);
112 } 111 }
113 return 0; 112 return 0;
114 } 113 }
(...skipping 1695 matching lines...) Expand 10 before | Expand all | Expand 10 after
1810 << "request_code " << static_cast<int>(error_event.request_code) << ", " 1809 << "request_code " << static_cast<int>(error_event.request_code) << ", "
1811 << "minor_code " << static_cast<int>(error_event.minor_code) 1810 << "minor_code " << static_cast<int>(error_event.minor_code)
1812 << " (" << request_str << ")"; 1811 << " (" << request_str << ")";
1813 } 1812 }
1814 1813
1815 // ---------------------------------------------------------------------------- 1814 // ----------------------------------------------------------------------------
1816 // End of x11_util_internal.h 1815 // End of x11_util_internal.h
1817 1816
1818 1817
1819 } // namespace ui 1818 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/x/selection_requestor.cc ('k') | ui/compositor/compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698