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

Side by Side Diff: webrtc/base/x11windowpicker.cc

Issue 1345433002: Add RTC_ prefix to contructormagic macros. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Formatting fix. Created 5 years, 3 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
« no previous file with comments | « webrtc/base/worker.h ('k') | webrtc/common.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2010 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2010 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 } 66 }
67 PropertyType* data() { 67 PropertyType* data() {
68 return reinterpret_cast<PropertyType*>(data_); 68 return reinterpret_cast<PropertyType*>(data_);
69 } 69 }
70 70
71 private: 71 private:
72 bool succeeded_; 72 bool succeeded_;
73 unsigned long size_; // NOLINT: type required by XGetWindowProperty 73 unsigned long size_; // NOLINT: type required by XGetWindowProperty
74 unsigned char* data_; 74 unsigned char* data_;
75 75
76 DISALLOW_COPY_AND_ASSIGN(XWindowProperty); 76 RTC_DISALLOW_COPY_AND_ASSIGN(XWindowProperty);
77 }; 77 };
78 78
79 // Stupid X11. It seems none of the synchronous returns codes from X11 calls 79 // Stupid X11. It seems none of the synchronous returns codes from X11 calls
80 // are meaningful unless an asynchronous error handler is configured. This 80 // are meaningful unless an asynchronous error handler is configured. This
81 // RAII class registers and unregisters an X11 error handler. 81 // RAII class registers and unregisters an X11 error handler.
82 class XErrorSuppressor { 82 class XErrorSuppressor {
83 public: 83 public:
84 explicit XErrorSuppressor(Display* display) 84 explicit XErrorSuppressor(Display* display)
85 : display_(display), original_error_handler_(NULL) { 85 : display_(display), original_error_handler_(NULL) {
86 SuppressX11Errors(); 86 SuppressX11Errors();
(...skipping 24 matching lines...) Expand all
111 if (handler != &ErrorHandler) { 111 if (handler != &ErrorHandler) {
112 LOG(LS_WARNING) << "Unbalanced XSetErrorHandler() calls detected. " 112 LOG(LS_WARNING) << "Unbalanced XSetErrorHandler() calls detected. "
113 << "Final error handler may not be what you expect!"; 113 << "Final error handler may not be what you expect!";
114 } 114 }
115 original_error_handler_ = NULL; 115 original_error_handler_ = NULL;
116 } 116 }
117 117
118 Display* display_; 118 Display* display_;
119 XErrorHandler original_error_handler_; 119 XErrorHandler original_error_handler_;
120 120
121 DISALLOW_COPY_AND_ASSIGN(XErrorSuppressor); 121 RTC_DISALLOW_COPY_AND_ASSIGN(XErrorSuppressor);
122 }; 122 };
123 123
124 // Hiding all X11 specifics inside its own class. This to avoid 124 // Hiding all X11 specifics inside its own class. This to avoid
125 // conflicts between talk and X11 header declarations. 125 // conflicts between talk and X11 header declarations.
126 class XWindowEnumerator { 126 class XWindowEnumerator {
127 public: 127 public:
128 XWindowEnumerator() 128 XWindowEnumerator()
129 : display_(NULL), 129 : display_(NULL),
130 has_composite_extension_(false), 130 has_composite_extension_(false),
131 has_render_extension_(false) { 131 has_render_extension_(false) {
(...skipping 677 matching lines...) Expand 10 before | Expand all | Expand 10 after
809 int height) { 809 int height) {
810 return enumerator_->GetDesktopThumbnail(id, width, height); 810 return enumerator_->GetDesktopThumbnail(id, width, height);
811 } 811 }
812 812
813 bool X11WindowPicker::GetDesktopDimensions(const DesktopId& id, int* width, 813 bool X11WindowPicker::GetDesktopDimensions(const DesktopId& id, int* width,
814 int* height) { 814 int* height) {
815 return enumerator_->GetDesktopDimensions(id, width, height); 815 return enumerator_->GetDesktopDimensions(id, width, height);
816 } 816 }
817 817
818 } // namespace rtc 818 } // namespace rtc
OLDNEW
« no previous file with comments | « webrtc/base/worker.h ('k') | webrtc/common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698