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

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

Issue 2452263003: Add DesktopCapturer GetSourceList SelectSource FocusOnSelectedSource functions (Closed)
Patch Set: Fix build break on Chromium Created 4 years, 1 month 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/modules/desktop_capture/window_capturer.cc ('k') | 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) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 // either ApplicationFrameWindow or windows.UI.Core.coreWindow. The 56 // either ApplicationFrameWindow or windows.UI.Core.coreWindow. The
57 // associated windows cannot be captured, so we skip them. 57 // associated windows cannot be captured, so we skip them.
58 // http://crbug.com/526883. 58 // http://crbug.com/526883.
59 if (rtc::IsWindows8OrLater() && 59 if (rtc::IsWindows8OrLater() &&
60 (wcscmp(class_name, L"ApplicationFrameWindow") == 0 || 60 (wcscmp(class_name, L"ApplicationFrameWindow") == 0 ||
61 wcscmp(class_name, L"Windows.UI.Core.CoreWindow") == 0)) { 61 wcscmp(class_name, L"Windows.UI.Core.CoreWindow") == 0)) {
62 return TRUE; 62 return TRUE;
63 } 63 }
64 64
65 WindowCapturer::Window window; 65 WindowCapturer::Window window;
66 window.id = reinterpret_cast<WindowCapturer::WindowId>(hwnd); 66 window.id = reinterpret_cast<WindowId>(hwnd);
67 67
68 const size_t kTitleLength = 500; 68 const size_t kTitleLength = 500;
69 WCHAR window_title[kTitleLength]; 69 WCHAR window_title[kTitleLength];
70 // Truncate the title if it's longer than kTitleLength. 70 // Truncate the title if it's longer than kTitleLength.
71 GetWindowText(hwnd, window_title, kTitleLength); 71 GetWindowText(hwnd, window_title, kTitleLength);
72 window.title = rtc::ToUtf8(window_title); 72 window.title = rtc::ToUtf8(window_title);
73 73
74 // Skip windows when we failed to convert the title or it is empty. 74 // Skip windows when we failed to convert the title or it is empty.
75 if (window.title.empty()) 75 if (window.title.empty())
76 return TRUE; 76 return TRUE;
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 } 264 }
265 265
266 } // namespace 266 } // namespace
267 267
268 // static 268 // static
269 WindowCapturer* WindowCapturer::Create(const DesktopCaptureOptions& options) { 269 WindowCapturer* WindowCapturer::Create(const DesktopCaptureOptions& options) {
270 return new WindowCapturerWin(); 270 return new WindowCapturerWin();
271 } 271 }
272 272
273 } // namespace webrtc 273 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/desktop_capture/window_capturer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698