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

Side by Side Diff: webrtc/modules/desktop_capture/screen_drawer_win.cc

Issue 2440563003: SUCCEEDED macro is misused (Closed)
Patch Set: Created 4 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
« no previous file with comments | « no previous file | no next file » | 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 (c) 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2016 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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 points[1].y = end.y(); 167 points[1].y = end.y();
168 SetDCPenColor(hdc_, ColorToRef(color)); 168 SetDCPenColor(hdc_, ColorToRef(color));
169 Polyline(hdc_, points, 2); 169 Polyline(hdc_, points, 2);
170 } 170 }
171 171
172 void ScreenDrawerWin::DrawDot(DesktopVector vect, RgbaColor color) { 172 void ScreenDrawerWin::DrawDot(DesktopVector vect, RgbaColor color) {
173 SetPixel(hdc_, vect.x(), vect.y(), ColorToRef(color)); 173 SetPixel(hdc_, vect.x(), vect.y(), ColorToRef(color));
174 } 174 }
175 175
176 void ScreenDrawerWin::BringToFront() { 176 void ScreenDrawerWin::BringToFront() {
177 if (SUCCEEDED(SetWindowPos( 177 if (SetWindowPos(window_, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE)
178 window_, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE))) { 178 == TRUE) {
Sergey Ulanov 2016/10/20 17:31:15 git cl format please. It formats this code differe
Hzj_jie 2016/10/20 18:15:18 Done.
179 return; 179 return;
180 } 180 }
181 181
182 long ex_style = GetWindowLong(window_, GWL_EXSTYLE); 182 long ex_style = GetWindowLong(window_, GWL_EXSTYLE);
183 ex_style |= WS_EX_TOPMOST; 183 ex_style |= WS_EX_TOPMOST;
184 if (SetWindowLong(window_, GWL_EXSTYLE, ex_style) != 0) { 184 if (SetWindowLong(window_, GWL_EXSTYLE, ex_style) != 0) {
185 return; 185 return;
186 } 186 }
187 187
188 BringWindowToTop(window_); 188 BringWindowToTop(window_);
189 } 189 }
190 190
191 } // namespace 191 } // namespace
192 192
193 // static 193 // static
194 std::unique_ptr<ScreenDrawerLock> ScreenDrawerLock::Create() { 194 std::unique_ptr<ScreenDrawerLock> ScreenDrawerLock::Create() {
195 return std::unique_ptr<ScreenDrawerLock>(new ScreenDrawerLockWin()); 195 return std::unique_ptr<ScreenDrawerLock>(new ScreenDrawerLockWin());
196 } 196 }
197 197
198 // static 198 // static
199 std::unique_ptr<ScreenDrawer> ScreenDrawer::Create() { 199 std::unique_ptr<ScreenDrawer> ScreenDrawer::Create() {
200 return std::unique_ptr<ScreenDrawer>(new ScreenDrawerWin()); 200 return std::unique_ptr<ScreenDrawer>(new ScreenDrawerWin());
201 } 201 }
202 202
203 } // namespace webrtc 203 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698