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

Unified Diff: webrtc/modules/desktop_capture/screen_capturer_mac.mm

Issue 2155813003: [Chromoting] Remove screen saver logic out of ScreenCapturer implementations (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 5 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/modules/desktop_capture/win/screen_capturer_win_directx.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/desktop_capture/screen_capturer_mac.mm
diff --git a/webrtc/modules/desktop_capture/screen_capturer_mac.mm b/webrtc/modules/desktop_capture/screen_capturer_mac.mm
index b846b7571ceb84dbb089c291780d527e799e5895..7cb1720ed92235a5d0d1c170ecc1b619b4432b0d 100644
--- a/webrtc/modules/desktop_capture/screen_capturer_mac.mm
+++ b/webrtc/modules/desktop_capture/screen_capturer_mac.mm
@@ -18,7 +18,6 @@
#include <ApplicationServices/ApplicationServices.h>
#include <Cocoa/Cocoa.h>
#include <dlfcn.h>
-#include <IOKit/pwr_mgt/IOPMLib.h>
#include <OpenGL/CGLMacro.h>
#include <OpenGL/OpenGL.h>
@@ -262,12 +261,6 @@ class ScreenCapturerMac : public ScreenCapturer {
// Monitoring display reconfiguration.
rtc::scoped_refptr<DesktopConfigurationMonitor> desktop_config_monitor_;
- // Power management assertion to prevent the screen from sleeping.
- IOPMAssertionID power_assertion_id_display_ = kIOPMNullAssertionID;
-
- // Power management assertion to indicate that the user is active.
- IOPMAssertionID power_assertion_id_user_ = kIOPMNullAssertionID;
-
// Dynamically link to deprecated APIs for Mac OS X 10.6 support.
void* app_services_library_ = nullptr;
CGDisplayBaseAddressFunc cg_display_base_address_ = nullptr;
@@ -309,15 +302,6 @@ ScreenCapturerMac::ScreenCapturerMac(
: desktop_config_monitor_(desktop_config_monitor) {}
ScreenCapturerMac::~ScreenCapturerMac() {
- if (power_assertion_id_display_ != kIOPMNullAssertionID) {
- IOPMAssertionRelease(power_assertion_id_display_);
- power_assertion_id_display_ = kIOPMNullAssertionID;
- }
- if (power_assertion_id_user_ != kIOPMNullAssertionID) {
- IOPMAssertionRelease(power_assertion_id_user_);
- power_assertion_id_user_ = kIOPMNullAssertionID;
- }
-
ReleaseBuffers();
UnregisterRefreshAndMoveHandlers();
dlclose(app_services_library_);
@@ -352,21 +336,6 @@ void ScreenCapturerMac::Start(Callback* callback) {
assert(callback);
callback_ = callback;
-
- // Create power management assertions to wake the display and prevent it from
- // going to sleep on user idle.
- // TODO(jamiewalch): Use IOPMAssertionDeclareUserActivity on 10.7.3 and above
- // instead of the following two assertions.
- IOPMAssertionCreateWithName(kIOPMAssertionTypeNoDisplaySleep,
- kIOPMAssertionLevelOn,
- CFSTR("Chrome Remote Desktop connection active"),
- &power_assertion_id_display_);
- // This assertion ensures that the display is woken up if it already asleep
- // (as used by Apple Remote Desktop).
- IOPMAssertionCreateWithName(CFSTR("UserIsActive"),
- kIOPMAssertionLevelOn,
- CFSTR("Chrome Remote Desktop connection active"),
- &power_assertion_id_user_);
}
void ScreenCapturerMac::Capture(const DesktopRegion& region_to_capture) {
« no previous file with comments | « no previous file | webrtc/modules/desktop_capture/win/screen_capturer_win_directx.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698