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

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_(nullptr), func_(nullptr) {
47 // Try to load dwmapi.dll dynamically since it is not available on XP.
48 dwmapi_library_ = LoadLibrary(L"dwmapi.dll");
49 if (dwmapi_library_) {
50 func_ = reinterpret_cast<DwmIsCompositionEnabledFunc>(
51 GetProcAddress(dwmapi_library_, "DwmIsCompositionEnabled"));
52 }
53 }
54
55 AeroChecker::~AeroChecker() {
56 if (dwmapi_library_) {
57 FreeLibrary(dwmapi_library_);
58 }
59 }
60
61 bool AeroChecker::IsAeroEnabled() {
62 BOOL result = FALSE;
63 if (func_) {
64 func_(&result);
65 }
66 return result != FALSE;
67 }
68
46 } // namespace webrtc 69 } // 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