OLD | NEW |
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 |
11 #include "webrtc/modules/desktop_capture/window_capturer.h" | 11 #include "webrtc/modules/desktop_capture/window_capturer.h" |
12 | 12 |
13 #include <assert.h> | 13 #include <assert.h> |
14 #include <ApplicationServices/ApplicationServices.h> | 14 #include <ApplicationServices/ApplicationServices.h> |
15 #include <Cocoa/Cocoa.h> | 15 #include <Cocoa/Cocoa.h> |
16 #include <CoreFoundation/CoreFoundation.h> | 16 #include <CoreFoundation/CoreFoundation.h> |
17 | 17 |
18 #include "webrtc/base/macutils.h" | 18 #include "webrtc/base/macutils.h" |
19 #include "webrtc/base/scoped_ref_ptr.h" | 19 #include "webrtc/base/scoped_ref_ptr.h" |
20 #include "webrtc/modules/desktop_capture/desktop_capture_options.h" | 20 #include "webrtc/modules/desktop_capture/desktop_capture_options.h" |
21 #include "webrtc/modules/desktop_capture/desktop_frame.h" | 21 #include "webrtc/modules/desktop_capture/desktop_frame.h" |
22 #include "webrtc/modules/desktop_capture/mac/desktop_configuration.h" | 22 #include "webrtc/modules/desktop_capture/mac/desktop_configuration.h" |
23 #include "webrtc/modules/desktop_capture/mac/full_screen_chrome_window_detector.
h" | 23 #include "webrtc/modules/desktop_capture/mac/full_screen_chrome_window_detector.
h" |
24 #include "webrtc/modules/desktop_capture/mac/window_list_utils.h" | 24 #include "webrtc/modules/desktop_capture/mac/window_list_utils.h" |
25 #include "webrtc/system_wrappers/interface/logging.h" | 25 #include "webrtc/system_wrappers/include/logging.h" |
26 #include "webrtc/system_wrappers/interface/tick_util.h" | 26 #include "webrtc/system_wrappers/include/tick_util.h" |
27 | 27 |
28 namespace webrtc { | 28 namespace webrtc { |
29 | 29 |
30 namespace { | 30 namespace { |
31 | 31 |
32 // Returns true if the window exists. | 32 // Returns true if the window exists. |
33 bool IsWindowValid(CGWindowID id) { | 33 bool IsWindowValid(CGWindowID id) { |
34 CFArrayRef window_id_array = | 34 CFArrayRef window_id_array = |
35 CFArrayCreate(NULL, reinterpret_cast<const void **>(&id), 1, NULL); | 35 CFArrayCreate(NULL, reinterpret_cast<const void **>(&id), 1, NULL); |
36 CFArrayRef window_array = | 36 CFArrayRef window_array = |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 } | 232 } |
233 | 233 |
234 } // namespace | 234 } // namespace |
235 | 235 |
236 // static | 236 // static |
237 WindowCapturer* WindowCapturer::Create(const DesktopCaptureOptions& options) { | 237 WindowCapturer* WindowCapturer::Create(const DesktopCaptureOptions& options) { |
238 return new WindowCapturerMac(options.full_screen_chrome_window_detector()); | 238 return new WindowCapturerMac(options.full_screen_chrome_window_detector()); |
239 } | 239 } |
240 | 240 |
241 } // namespace webrtc | 241 } // namespace webrtc |
OLD | NEW |