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 <assert.h> | 11 #include <assert.h> |
12 #include <ApplicationServices/ApplicationServices.h> | 12 #include <ApplicationServices/ApplicationServices.h> |
13 #include <Cocoa/Cocoa.h> | 13 #include <Cocoa/Cocoa.h> |
14 #include <CoreFoundation/CoreFoundation.h> | 14 #include <CoreFoundation/CoreFoundation.h> |
15 | 15 |
16 #include "webrtc/base/constructormagic.h" | 16 #include "webrtc/base/constructormagic.h" |
| 17 #include "webrtc/base/logging.h" |
17 #include "webrtc/base/macutils.h" | 18 #include "webrtc/base/macutils.h" |
18 #include "webrtc/base/scoped_ref_ptr.h" | 19 #include "webrtc/base/scoped_ref_ptr.h" |
19 #include "webrtc/modules/desktop_capture/desktop_capturer.h" | 20 #include "webrtc/modules/desktop_capture/desktop_capturer.h" |
20 #include "webrtc/modules/desktop_capture/desktop_capture_options.h" | 21 #include "webrtc/modules/desktop_capture/desktop_capture_options.h" |
21 #include "webrtc/modules/desktop_capture/desktop_frame.h" | 22 #include "webrtc/modules/desktop_capture/desktop_frame.h" |
22 #include "webrtc/modules/desktop_capture/mac/desktop_configuration.h" | 23 #include "webrtc/modules/desktop_capture/mac/desktop_configuration.h" |
23 #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" |
24 #include "webrtc/modules/desktop_capture/mac/window_list_utils.h" | 25 #include "webrtc/modules/desktop_capture/mac/window_list_utils.h" |
25 #include "webrtc/system_wrappers/include/logging.h" | |
26 | 26 |
27 namespace webrtc { | 27 namespace webrtc { |
28 | 28 |
29 namespace { | 29 namespace { |
30 | 30 |
31 // Returns true if the window exists. | 31 // Returns true if the window exists. |
32 bool IsWindowValid(CGWindowID id) { | 32 bool IsWindowValid(CGWindowID id) { |
33 CFArrayRef window_id_array = | 33 CFArrayRef window_id_array = |
34 CFArrayCreate(nullptr, reinterpret_cast<const void**>(&id), 1, nullptr); | 34 CFArrayCreate(nullptr, reinterpret_cast<const void**>(&id), 1, nullptr); |
35 CFArrayRef window_array = | 35 CFArrayRef window_array = |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 } // namespace | 189 } // namespace |
190 | 190 |
191 // static | 191 // static |
192 std::unique_ptr<DesktopCapturer> DesktopCapturer::CreateRawWindowCapturer( | 192 std::unique_ptr<DesktopCapturer> DesktopCapturer::CreateRawWindowCapturer( |
193 const DesktopCaptureOptions& options) { | 193 const DesktopCaptureOptions& options) { |
194 return std::unique_ptr<DesktopCapturer>( | 194 return std::unique_ptr<DesktopCapturer>( |
195 new WindowCapturerMac(options.full_screen_chrome_window_detector())); | 195 new WindowCapturerMac(options.full_screen_chrome_window_detector())); |
196 } | 196 } |
197 | 197 |
198 } // namespace webrtc | 198 } // namespace webrtc |
OLD | NEW |