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/constructormagic.h" | 18 #include "webrtc/base/constructormagic.h" |
19 #include "webrtc/base/macutils.h" | 19 #include "webrtc/base/macutils.h" |
20 #include "webrtc/base/scoped_ref_ptr.h" | 20 #include "webrtc/base/scoped_ref_ptr.h" |
21 #include "webrtc/modules/desktop_capture/desktop_capture_options.h" | 21 #include "webrtc/modules/desktop_capture/desktop_capture_options.h" |
22 #include "webrtc/modules/desktop_capture/desktop_frame.h" | 22 #include "webrtc/modules/desktop_capture/desktop_frame.h" |
23 #include "webrtc/modules/desktop_capture/mac/desktop_configuration.h" | 23 #include "webrtc/modules/desktop_capture/mac/desktop_configuration.h" |
24 #include "webrtc/modules/desktop_capture/mac/full_screen_chrome_window_detector.
h" | 24 #include "webrtc/modules/desktop_capture/mac/full_screen_chrome_window_detector.
h" |
25 #include "webrtc/modules/desktop_capture/mac/window_list_utils.h" | 25 #include "webrtc/modules/desktop_capture/mac/window_list_utils.h" |
26 #include "webrtc/system_wrappers/include/logging.h" | 26 #include "webrtc/system_wrappers/include/logging.h" |
27 #include "webrtc/system_wrappers/include/tick_util.h" | |
28 | 27 |
29 namespace webrtc { | 28 namespace webrtc { |
30 | 29 |
31 namespace { | 30 namespace { |
32 | 31 |
33 // Returns true if the window exists. | 32 // Returns true if the window exists. |
34 bool IsWindowValid(CGWindowID id) { | 33 bool IsWindowValid(CGWindowID id) { |
35 CFArrayRef window_id_array = | 34 CFArrayRef window_id_array = |
36 CFArrayCreate(NULL, reinterpret_cast<const void **>(&id), 1, NULL); | 35 CFArrayCreate(NULL, reinterpret_cast<const void **>(&id), 1, NULL); |
37 CFArrayRef window_array = | 36 CFArrayRef window_array = |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 } | 238 } |
240 | 239 |
241 } // namespace | 240 } // namespace |
242 | 241 |
243 // static | 242 // static |
244 WindowCapturer* WindowCapturer::Create(const DesktopCaptureOptions& options) { | 243 WindowCapturer* WindowCapturer::Create(const DesktopCaptureOptions& options) { |
245 return new WindowCapturerMac(options.full_screen_chrome_window_detector()); | 244 return new WindowCapturerMac(options.full_screen_chrome_window_detector()); |
246 } | 245 } |
247 | 246 |
248 } // namespace webrtc | 247 } // namespace webrtc |
OLD | NEW |