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

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

Issue 2623473004: Replace all use of the VERIFY macro. (Closed)
Patch Set: Delete a DCHECK, instead log and return failure. And fix compile error in previous patch set. Created 3 years, 10 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
OLDNEW
1 /* 1 /*
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2004 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
11 #include "webrtc/base/checks.h" 11 #include "webrtc/base/checks.h"
12 #include "webrtc/base/common.h"
13 #include "webrtc/base/logging.h" 12 #include "webrtc/base/logging.h"
14 #include "webrtc/base/win32window.h" 13 #include "webrtc/base/win32window.h"
15 14
16 namespace rtc { 15 namespace rtc {
17 16
18 /////////////////////////////////////////////////////////////////////////////// 17 ///////////////////////////////////////////////////////////////////////////////
19 // Win32Window 18 // Win32Window
20 /////////////////////////////////////////////////////////////////////////////// 19 ///////////////////////////////////////////////////////////////////////////////
21 20
22 static const wchar_t kWindowBaseClassName[] = L"WindowBaseClass"; 21 static const wchar_t kWindowBaseClassName[] = L"WindowBaseClass";
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 LOG_GLE(LS_ERROR) << "RegisterClassEx failed"; 57 LOG_GLE(LS_ERROR) << "RegisterClassEx failed";
59 return false; 58 return false;
60 } 59 }
61 } 60 }
62 wnd_ = ::CreateWindowEx(exstyle, kWindowBaseClassName, title, style, 61 wnd_ = ::CreateWindowEx(exstyle, kWindowBaseClassName, title, style,
63 x, y, cx, cy, parent, NULL, instance_, this); 62 x, y, cx, cy, parent, NULL, instance_, this);
64 return (NULL != wnd_); 63 return (NULL != wnd_);
65 } 64 }
66 65
67 void Win32Window::Destroy() { 66 void Win32Window::Destroy() {
68 VERIFY(::DestroyWindow(wnd_) != FALSE); 67 const bool success = ::DestroyWindow(wnd_);
68 RTC_DCHECK(success);
69 } 69 }
70 70
71 void Win32Window::Shutdown() { 71 void Win32Window::Shutdown() {
72 if (window_class_) { 72 if (window_class_) {
73 ::UnregisterClass(MAKEINTATOM(window_class_), instance_); 73 ::UnregisterClass(MAKEINTATOM(window_class_), instance_);
74 window_class_ = 0; 74 window_class_ = 0;
75 } 75 }
76 } 76 }
77 77
78 bool Win32Window::OnMessage(UINT uMsg, WPARAM wParam, LPARAM lParam, 78 bool Win32Window::OnMessage(UINT uMsg, WPARAM wParam, LPARAM lParam,
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 that->OnNcDestroy(); 113 that->OnNcDestroy();
114 } 114 }
115 if (handled) { 115 if (handled) {
116 return result; 116 return result;
117 } 117 }
118 } 118 }
119 return ::DefWindowProc(hwnd, uMsg, wParam, lParam); 119 return ::DefWindowProc(hwnd, uMsg, wParam, lParam);
120 } 120 }
121 121
122 } // namespace rtc 122 } // namespace rtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698