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

Side by Side Diff: webrtc/modules/desktop_capture/win/window_capture_utils.cc

Issue 1199073002: Enable cropping window capturing for Win7 when Aero is disabled. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 5 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 (c) 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2014 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 25 matching lines...) Expand all
36 rect.left + border.width(), 36 rect.left + border.width(),
37 rect.top, 37 rect.top,
38 rect.right - border.width(), 38 rect.right - border.width(),
39 rect.bottom - border.height()); 39 rect.bottom - border.height());
40 } else { 40 } else {
41 *cropped_rect = *original_rect; 41 *cropped_rect = *original_rect;
42 } 42 }
43 return true; 43 return true;
44 } 44 }
45 45
46 AeroChecker::AeroChecker() : dwmapi_library_(NULL), func_(NULL) {}
Sergey Ulanov 2015/07/14 23:11:16 nit: s/NULL/nullptr/
jiayl2 2015/07/15 23:15:21 Done.
47
48 AeroChecker::~AeroChecker() {
49 if (dwmapi_library_) {
50 FreeLibrary(dwmapi_library_);
51 }
52 }
53
54 bool AeroChecker::IsAeroEnabled() {
55 // Try to load dwmapi.dll dynamically since it is not available on XP.
56 if (dwmapi_library_ == NULL) {
57 dwmapi_library_ = LoadLibrary(L"dwmapi.dll");
Sergey Ulanov 2015/07/14 23:11:16 Move this to the constructor so you don't try to l
jiayl2 2015/07/15 23:15:21 Done.
58 if (dwmapi_library_) {
59 func_ = reinterpret_cast<DwmIsCompositionEnabledFunc>(
60 GetProcAddress(dwmapi_library_, "DwmIsCompositionEnabled"));
61 }
62 }
63 BOOL result = FALSE;
64 if (func_) {
65 func_(&result);
66 }
67 return result != FALSE;
68 }
69
46 } // namespace webrtc 70 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/desktop_capture/win/window_capture_utils.h ('k') | webrtc/modules/desktop_capture/window_capturer_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698