| 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/mouse_cursor_monitor.h" | 11 #include "webrtc/modules/desktop_capture/mouse_cursor_monitor.h" |
| 12 | 12 |
| 13 #include <assert.h> | 13 #include <assert.h> |
| 14 | 14 |
| 15 #include <memory> | 15 #include <memory> |
| 16 | 16 |
| 17 #include <ApplicationServices/ApplicationServices.h> | 17 #include <ApplicationServices/ApplicationServices.h> |
| 18 #include <Cocoa/Cocoa.h> | 18 #include <Cocoa/Cocoa.h> |
| 19 #include <CoreFoundation/CoreFoundation.h> | 19 #include <CoreFoundation/CoreFoundation.h> |
| 20 | 20 |
| 21 #include "webrtc/base/macutils.h" | |
| 22 #include "webrtc/base/scoped_ref_ptr.h" | |
| 23 #include "webrtc/modules/desktop_capture/desktop_capture_options.h" | 21 #include "webrtc/modules/desktop_capture/desktop_capture_options.h" |
| 24 #include "webrtc/modules/desktop_capture/desktop_frame.h" | 22 #include "webrtc/modules/desktop_capture/desktop_frame.h" |
| 25 #include "webrtc/modules/desktop_capture/mac/desktop_configuration.h" | 23 #include "webrtc/modules/desktop_capture/mac/desktop_configuration.h" |
| 26 #include "webrtc/modules/desktop_capture/mac/desktop_configuration_monitor.h" | 24 #include "webrtc/modules/desktop_capture/mac/desktop_configuration_monitor.h" |
| 27 #include "webrtc/modules/desktop_capture/mac/full_screen_chrome_window_detector.
h" | 25 #include "webrtc/modules/desktop_capture/mac/full_screen_chrome_window_detector.
h" |
| 28 #include "webrtc/modules/desktop_capture/mouse_cursor.h" | 26 #include "webrtc/modules/desktop_capture/mouse_cursor.h" |
| 27 #include "webrtc/rtc_base/macutils.h" |
| 28 #include "webrtc/rtc_base/scoped_ref_ptr.h" |
| 29 | 29 |
| 30 namespace webrtc { | 30 namespace webrtc { |
| 31 | 31 |
| 32 namespace { | 32 namespace { |
| 33 CGImageRef CreateScaledCGImage(CGImageRef image, int width, int height) { | 33 CGImageRef CreateScaledCGImage(CGImageRef image, int width, int height) { |
| 34 // Create context, keeping original image properties. | 34 // Create context, keeping original image properties. |
| 35 CGColorSpaceRef colorspace = CGImageGetColorSpace(image); | 35 CGColorSpaceRef colorspace = CGImageGetColorSpace(image); |
| 36 CGContextRef context = CGBitmapContextCreate(nullptr, | 36 CGContextRef context = CGBitmapContextCreate(nullptr, |
| 37 width, | 37 width, |
| 38 height, | 38 height, |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 return new MouseCursorMonitorMac(options, window, kInvalidScreenId); | 324 return new MouseCursorMonitorMac(options, window, kInvalidScreenId); |
| 325 } | 325 } |
| 326 | 326 |
| 327 MouseCursorMonitor* MouseCursorMonitor::CreateForScreen( | 327 MouseCursorMonitor* MouseCursorMonitor::CreateForScreen( |
| 328 const DesktopCaptureOptions& options, | 328 const DesktopCaptureOptions& options, |
| 329 ScreenId screen) { | 329 ScreenId screen) { |
| 330 return new MouseCursorMonitorMac(options, kCGNullWindowID, screen); | 330 return new MouseCursorMonitorMac(options, kCGNullWindowID, screen); |
| 331 } | 331 } |
| 332 | 332 |
| 333 } // namespace webrtc | 333 } // namespace webrtc |
| OLD | NEW |